[DragonFlyBSD - Bug #3123] (New) crypto/openssh/channels.c:3258: bad if statement ?

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Thu Feb 22 09:19:52 PST 2018


Issue #3123 has been reported by dcb.

----------------------------------------
Bug #3123: crypto/openssh/channels.c:3258: bad if statement ?
http://bugs.dragonflybsd.org/issues/3123

* Author: dcb
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
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) {




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list