tree-wide: use path_startswith() rather than startswith() where ever that's appropriate

When checking path prefixes we really should use the right APIs, just in
case people add multiple slashes to their paths...
This commit is contained in:
Lennart Poettering
2017-08-09 19:03:39 +02:00
parent a119ec7c82
commit 27458ed629
7 changed files with 24 additions and 13 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ static int parse_argv(int argc, char *argv[]) {
* sysctl name available. */
sysctl_normalize(optarg);
if (startswith(optarg, "/proc/sys"))
if (path_startswith(optarg, "/proc/sys"))
p = strdup(optarg);
else
p = strappend("/proc/sys/", optarg);