aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-11-11 10:12:34 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-11 18:15:36 +0000
commit4a9705774ad12b6cf1c9b2e3a200c635c18b6f98 (patch)
tree5ef34405527b60364e7e7217c1c81d2ec5be8fc7 /tshark.c
parent978d7a8f05888fac146e836a4efb9dcc70947d34 (diff)
Fixup a couple of stdout checks.
Change-Id: I942cd9010901d7b6c4f5b390fb23f79d72fb05d0 Reviewed-on: https://code.wireshark.org/review/11740 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tshark.c b/tshark.c
index 775a62c06f..4896c2ef80 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3199,7 +3199,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
if (linktype != WTAP_ENCAP_PER_PACKET &&
out_file_type == WTAP_FILE_TYPE_SUBTYPE_PCAP) {
tshark_debug("tshark: writing PCAP format to %s", save_file);
- if (strcmp(save_file, "-")) {
+ if (strcmp(save_file, "-") == 0) {
/* Write to the standard output. */
pdh = wtap_dump_open_stdout(out_file_type, linktype,
snapshot_length, FALSE /* compressed */, &err);
@@ -3210,7 +3210,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
}
else {
tshark_debug("tshark: writing format type %d, to %s", out_file_type, save_file);
- if (strcmp(save_file, "-")) {
+ if (strcmp(save_file, "-") == 0) {
/* Write to the standard output. */
pdh = wtap_dump_open_stdout_ng(out_file_type, linktype,
snapshot_length, FALSE /* compressed */, shb_hdr, idb_inf, nrb_hdr, &err);