utils: add noalloc flag to modifyString()

This should make it more straightforward for code analyzers to
tell if the function is going to allocate memory.
This commit is contained in:
Justin Maggard
2014-04-18 15:18:44 -07:00
parent b0550495e8
commit 331d484555
5 changed files with 32 additions and 24 deletions

View File

@ -704,7 +704,7 @@ start_inotify()
i += EVENT_SIZE + event->len;
continue;
}
esc_name = modifyString(strdup(event->name), "&", "&");
esc_name = modifyString(strdup(event->name), "&", "&", 0);
snprintf(path_buf, sizeof(path_buf), "%s/%s", get_path_from_wd(event->wd), event->name);
if ( event->mask & IN_ISDIR && (event->mask & (IN_CREATE|IN_MOVED_TO)) )
{