From 1c2889faeeae87abff5cf767b82ed95f206a42c8 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 27 Nov 2019 10:28:22 +0100 Subject: dispatcher: fix detection of no-wait dispatcher scripts While at it, use NM_STR_HAS_SUFFIX() with the string literal. Fixes: 35a428f16897 ('dispatcher: look for the scripts in /usr/lib as well') --- dispatcher/nm-dispatcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dispatcher') diff --git a/dispatcher/nm-dispatcher.c b/dispatcher/nm-dispatcher.c index 9aeeef6815..a2d8cf898a 100644 --- a/dispatcher/nm-dispatcher.c +++ b/dispatcher/nm-dispatcher.c @@ -655,7 +655,7 @@ script_must_wait (const char *path) dir = g_path_get_dirname (link); 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; } -- cgit v1.2.1