Fix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c:

contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
  if (!buf || buf[0] == '\0')
      ~^~~

In the affected function, 'buf' is declared as an array of char, so it
can never be null.  Remove the unecessary check.
This commit is contained in:
Dimitry Andric 2015-01-28 18:19:25 +00:00
parent 47176cacac
commit 54edb5043c

View file

@ -494,7 +494,7 @@ readent:
buf[0] = '\0';
fgets(buf, 256, passwd_fp);
passwd_line++;
if (!buf || buf[0] == '\0')
if (buf[0] == '\0')
goto readent;
/* read user name */