1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-27 14:03:43 +03:00

core/path: add one more assert

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-02-25 21:59:04 +01:00
parent e4de62591b
commit 8012712791

View File

@ -80,7 +80,8 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
(void) sd_event_source_set_description(s->event_source, "path");
/* This assumes the path was passed through path_kill_slashes()! */
/* This function assumes the path was passed through path_kill_slashes()! */
assert(!strstr(s->path, "//"));
for (slash = strchr(s->path, '/'); ; slash = strchr(slash+1, '/')) {
char *cut = NULL;