diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-03-06 10:09:56 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-03-06 18:11:12 +0000 |
commit | 68b7b1ab57529a3a45d6d0f24445c66d79366752 (patch) | |
tree | 16b9df5d0b3c2c158a0ada95dd8b89d586985b0f | |
parent | ad3afb02c369323d83df0cd38fc790203adfd889 (diff) | |
download | wireshark-68b7b1ab57529a3a45d6d0f24445c66d79366752.tar.gz |
To see whether a string equals another string, just use strcmp().
The goal here is to see whether out_filename is "-" or not; there's no
good reason to use strncmp() here.
Fixes Coverity CID 1316605.
Change-Id: I851eee869afed58ac091982b8d303b0eda276c2e
Reviewed-on: https://code.wireshark.org/review/14361
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | mergecap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mergecap.c b/mergecap.c index 5dae9a14f3..7d2d696868 100644 --- a/mergecap.c +++ b/mergecap.c @@ -452,7 +452,7 @@ main(int argc, char *argv[]) } /* open the outfile */ - if (strncmp(out_filename, "-", 2) == 0) { + if (strcmp(out_filename, "-") == 0) { /* use stdout as the outfile */ use_stdout = TRUE; out_fd = 1 /*stdout*/; |