In the line if (!dump_tcpdiag) { there was a logical error in checking the descriptor, which the static analyzer complained about (this action is always false) fixed by replacing !dump_tcpdiag with !dump_fp Reported-by: SVACE static analyzer Signed-off-by: Anton Moryakov --- misc/ss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/ss.c b/misc/ss.c index de02fccb..20d0766d 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -6228,7 +6228,7 @@ int main(int argc, char *argv[]) } if (dump_tcpdiag[0] != '-') { dump_fp = fopen(dump_tcpdiag, "w"); - if (!dump_tcpdiag) { + if (!dump_fp) { perror("fopen dump file"); exit(-1); } -- 2.39.2