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

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Tue Jun 23 05:34:56 PDT 2020


Issue #3123 has been updated by deef.

Status changed from New to Closed

Discussed with swildner on IRC, this should be reported to upstream and DragonFly will import the change when it's updated there.

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

* Author: dcb
* Status: Closed
* 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