Project

General

Profile

Actions

Bug #3123

closed

crypto/openssh/channels.c:3258: bad if statement ?

Added by dcb about 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/22/2018
Due date:
% Done:

0%

Estimated time:

Description

crypto/openssh/channels.c:3258]: (warning) The expression 'strcmp(listen_addr,"localhost") != 0' is suspicious. It overlaps 'strcmp(listen_addr,"127.0.0.1") == 0'.

Source code is

} else if (strcmp(listen_addr, "localhost") != 0 ||
strcmp(listen_addr, "127.0.0.1") 0 ||
strcmp(listen_addr, "::1") 0) {

maybe better code

} else if (strcmp(listen_addr, "localhost")  0 ||
strcmp(listen_addr, "127.0.0.1") 0 ||
strcmp(listen_addr, "::1") == 0) {
Actions

Also available in: Atom PDF