projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4de625
)
core/path: add one more assert
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sun, 25 Feb 2018 20:59:04 +0000
(21:59 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 26 Feb 2018 14:49:27 +0000
(15:49 +0100)
src/core/path.c
patch
|
blob
|
history
diff --git
a/src/core/path.c
b/src/core/path.c
index
8a5ec0a
..
1893d8d
100644
(file)
--- a/
src/core/path.c
+++ b/
src/core/path.c
@@
-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;