condense assignment and path_kill_slashes calls

This commit is contained in:
Dave Reisner 2014-04-15 22:16:40 -04:00
parent 6d6c604ac8
commit dbb9401dba
2 changed files with 4 additions and 9 deletions

View File

@ -472,9 +472,7 @@ static int join_path(const char *controller, const char *path, const char *suffi
if (!t)
return -ENOMEM;
path_kill_slashes(t);
*fs = t;
*fs = path_kill_slashes(t);
return 0;
}
@ -957,8 +955,7 @@ int cg_split_spec(const char *spec, char **controller, char **path) {
if (!t)
return -ENOMEM;
path_kill_slashes(t);
*path = t;
*path = path_kill_slashes(t);
}
if (controller)
@ -1048,8 +1045,7 @@ int cg_mangle_path(const char *path, char **result) {
if (!t)
return -ENOMEM;
path_kill_slashes(t);
*result = t;
*result = path_kill_slashes(t);
return 0;
}

View File

@ -464,8 +464,7 @@ int find_binary(const char *name, char **filename) {
continue;
if (filename) {
path_kill_slashes(p);
*filename = p;
*filename = path_kill_slashes(p);
p = NULL;
}