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>
This commit is contained in:
Gerald Combs 2015-11-11 10:12:34 -08:00 committed by Guy Harris
parent 978d7a8f05
commit 4a9705774a
1 changed files with 2 additions and 2 deletions

View File

@ -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);