From Jose Pedro Oliveira:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 13 Mar 2012 15:27:22 +0000 (15:27 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 13 Mar 2012 15:27:22 +0000 (15:27 +0000)
dumpcap.c: code cleaning
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41535 f5534014-38df-0310-8fa8-9805f1628bb7

dumpcap.c

index e51f92894f79683415bf6a1e1be37ee327ee930d..8ab49dd8ac02b4ff39f78e9e4ec788d424451c6a 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -2652,16 +2652,16 @@ capture_loop_init_output(capture_options *capture_opts, loop_data *ld, char *err
                     pcap_opts->snaplen = pcap_snapshot(pcap_opts->pcap_h);
                 }
                 successful = libpcap_write_interface_description_block(global_ld.pdh,
-                                                                       NULL,                                              /* OPT_COMMENT       1 */
-                                                                       interface_opts.name,                               /* IDB_NAME          2 */
-                                                                       interface_opts.descr,                              /* IDB_DESCRIPTION   3 */
-                                                                       interface_opts.cfilter?interface_opts.cfilter:"",  /* IDB_FILTER       11 */
-                                                                       os_info_str->str,                                  /* IDB_OS           12 */
+                                                                       NULL,                       /* OPT_COMMENT       1 */
+                                                                       interface_opts.name,        /* IDB_NAME          2 */
+                                                                       interface_opts.descr,       /* IDB_DESCRIPTION   3 */
+                                                                       interface_opts.cfilter,     /* IDB_FILTER       11 */
+                                                                       os_info_str->str,           /* IDB_OS           12 */
                                                                        pcap_opts->linktype,
                                                                        pcap_opts->snaplen,
                                                                        &(global_ld.bytes_written),
-                                                                       0,                                                 /* IDB_IF_SPEED      8 */
-                                                                       pcap_opts->ts_nsec ? 9 : 6,                        /* IDB_TSRESOL       9 */
+                                                                       0,                          /* IDB_IF_SPEED      8 */
+                                                                       pcap_opts->ts_nsec ? 9 : 6, /* IDB_TSRESOL       9 */
                                                                        &global_ld.err);
             }
 
@@ -3110,16 +3110,16 @@ do_file_switch_or_stop(capture_options *capture_opts,
                     interface_opts = g_array_index(capture_opts->ifaces, interface_options, i);
                     pcap_opts = g_array_index(global_ld.pcaps, pcap_options *, i);
                     successful = libpcap_write_interface_description_block(global_ld.pdh,
-                                                                           NULL,                                              /* OPT_COMMENT       1 */
-                                                                           interface_opts.name,                               /* IDB_NAME              2 */
-                                                                           interface_opts.descr,                              /* IDB_DESCRIPTION   3 */
-                                                                           interface_opts.cfilter?interface_opts.cfilter:"",  /* IDB_FILTER       11 */
-                                                                           os_info_str->str,                                  /* IDB_OS           12 */
+                                                                           NULL,                       /* OPT_COMMENT       1 */
+                                                                           interface_opts.name,        /* IDB_NAME          2 */
+                                                                           interface_opts.descr,       /* IDB_DESCRIPTION   3 */
+                                                                           interface_opts.cfilter,     /* IDB_FILTER       11 */
+                                                                           os_info_str->str,           /* IDB_OS           12 */
                                                                            pcap_opts->linktype,
                                                                            pcap_opts->snaplen,
                                                                            &(global_ld.bytes_written),
-                                                                           0,                                                 /* IDB_IF_SPEED       8 */
-                                                                           pcap_opts->ts_nsec ? 9 : 6,                        /* IDB_TSRESOL        9 */
+                                                                           0,                          /* IDB_IF_SPEED      8 */
+                                                                           pcap_opts->ts_nsec ? 9 : 6, /* IDB_TSRESOL       9 */
                                                                            &global_ld.err);
                 }