replace strlen(s) > 0 by s[0] != '\0'

see #292
This commit is contained in:
Thomas Bernard 2018-04-22 21:21:58 +02:00
parent 2b6fa0839f
commit 0366cd0ba0
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ OpenAndConfSSDPReceiveSocket(int ipv6)
#if defined(SO_BINDTODEVICE) && !defined(MULTIPLE_EXTERNAL_IP) #if defined(SO_BINDTODEVICE) && !defined(MULTIPLE_EXTERNAL_IP)
/* One and only one LAN interface */ /* One and only one LAN interface */
if(lan_addrs.lh_first != NULL && lan_addrs.lh_first->list.le_next == NULL if(lan_addrs.lh_first != NULL && lan_addrs.lh_first->list.le_next == NULL
&& strlen(lan_addrs.lh_first->ifname) > 0) && lan_addrs.lh_first->ifname[0] != '\0')
{ {
if(setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, if(setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE,
lan_addrs.lh_first->ifname, lan_addrs.lh_first->ifname,