From 68b7b1ab57529a3a45d6d0f24445c66d79366752 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 6 Mar 2016 10:09:56 -0800 Subject: 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 --- mergecap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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*/; -- cgit v1.2.1