From 4a9705774ad12b6cf1c9b2e3a200c635c18b6f98 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 11 Nov 2015 10:12:34 -0800 Subject: Fixup a couple of stdout checks. Change-Id: I942cd9010901d7b6c4f5b390fb23f79d72fb05d0 Reviewed-on: https://code.wireshark.org/review/11740 Petri-Dish: Gerald Combs Reviewed-by: Guy Harris --- tshark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tshark.c') 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); -- cgit v1.2.3