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:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user