dispatcher: fix detection of no-wait dispatcher scripts

While at it, use NM_STR_HAS_SUFFIX() with the string literal.

Fixes: 35a428f168 ('dispatcher: look for the scripts in /usr/lib as well')
This commit is contained in:
Thomas Haller
2019-11-27 10:28:22 +01:00
parent 81bd50874b
commit 1c2889faee

View File

@@ -655,7 +655,7 @@ script_must_wait (const char *path)
dir = g_path_get_dirname (link); dir = g_path_get_dirname (link);
real = realpath (dir, NULL); real = realpath (dir, NULL);
if (real && !g_str_has_suffix (real, "/no-wait.d")) if (NM_STR_HAS_SUFFIX (real, "/no-wait.d"))
return FALSE; return FALSE;
} }