loolwsd: -Werror,-Wpointer-bool-conversion

error: address of array 'dir_proc->d_name' will always evaluate to 'true'

Henry says this is the correct fix.
This commit is contained in:
Miklos Vajna 2016-01-08 09:07:27 +01:00
parent ab1a3a147e
commit 8e5841cc58

View file

@ -154,7 +154,7 @@ int main(int argc, char **argv)
while ( ( dir_proc = readdir(root_proc) ) )
{
if ( !dir_proc && !dir_proc->d_name )
if ( !dir_proc && !dir_proc->d_name[0] )
error(EXIT_FAILURE, ENOTDIR, "bad dir");
if ( *dir_proc->d_name > '0' && *dir_proc->d_name <= '9' )