remove clang warning: better check for whether name field is empty

This commit is contained in:
Albert S. 2017-08-12 16:10:47 +02:00
parent c2b788ad50
commit 4d7bde2773
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ char *get_eventfile_abspath(struct inotify_event *event)
}
char *result = NULL;
if(event->name != NULL && *event->name != 0)
if((event->len) > 0 )
{
if(asprintf(&result, "%s/%s", wdpath, event->name) == -1)
{