summaryrefslogtreecommitdiff
path: root/dispatcher
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-11-27 10:28:22 +0100
committerThomas Haller <thaller@redhat.com>2019-11-27 11:41:53 +0100
commit1c2889faeeae87abff5cf767b82ed95f206a42c8 (patch)
tree9f08a6d9ea1c1b7952d090be14b5a304bf25236b /dispatcher
parent81bd50874b4f3f29114981021e34dff3f6b932a5 (diff)
downloadNetworkManager-1c2889faeeae87abff5cf767b82ed95f206a42c8.tar.gz
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')
Diffstat (limited to 'dispatcher')
-rw-r--r--dispatcher/nm-dispatcher.c2
1 files changed, 1 insertions, 1 deletions
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;
}