aboutsummaryrefslogtreecommitdiffstats
path: root/mergecap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-03-06 10:09:56 -0800
committerGuy Harris <guy@alum.mit.edu>2016-03-06 18:11:12 +0000
commit68b7b1ab57529a3a45d6d0f24445c66d79366752 (patch)
tree16b9df5d0b3c2c158a0ada95dd8b89d586985b0f /mergecap.c
parentad3afb02c369323d83df0cd38fc790203adfd889 (diff)
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>
Diffstat (limited to 'mergecap.c')
-rw-r--r--mergecap.c2
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*/;