basic/path-util: change 'char *func' to 'char* func'
Both styles were mixed in the file, but I find the latter much nicer, because it's not the func that is the pointer, but the return type.
This commit is contained in:
@@ -40,7 +40,7 @@ int path_split_and_make_absolute(const char *p, char ***ret) {
|
||||
return r;
|
||||
}
|
||||
|
||||
char *path_make_absolute(const char *p, const char *prefix) {
|
||||
char* path_make_absolute(const char *p, const char *prefix) {
|
||||
assert(p);
|
||||
|
||||
/* Makes every item in the list an absolute path by prepending
|
||||
@@ -252,7 +252,7 @@ int path_strv_make_absolute_cwd(char **l) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
char **path_strv_resolve(char **l, const char *root) {
|
||||
char** path_strv_resolve(char **l, const char *root) {
|
||||
unsigned k = 0;
|
||||
bool enomem = false;
|
||||
int r;
|
||||
@@ -333,7 +333,7 @@ char **path_strv_resolve(char **l, const char *root) {
|
||||
return l;
|
||||
}
|
||||
|
||||
char **path_strv_resolve_uniq(char **l, const char *root) {
|
||||
char** path_strv_resolve_uniq(char **l, const char *root) {
|
||||
|
||||
if (strv_isempty(l))
|
||||
return l;
|
||||
@@ -344,7 +344,7 @@ char **path_strv_resolve_uniq(char **l, const char *root) {
|
||||
return strv_uniq(l);
|
||||
}
|
||||
|
||||
char *path_simplify_full(char *path, PathSimplifyFlags flags) {
|
||||
char* path_simplify_full(char *path, PathSimplifyFlags flags) {
|
||||
bool add_slash = false, keep_trailing_slash;
|
||||
char *f = ASSERT_PTR(path);
|
||||
int r;
|
||||
@@ -397,7 +397,7 @@ char *path_simplify_full(char *path, PathSimplifyFlags flags) {
|
||||
return path;
|
||||
}
|
||||
|
||||
char *path_startswith_full(const char *path, const char *prefix, bool accept_dot_dot) {
|
||||
char* path_startswith_full(const char *path, const char *prefix, bool accept_dot_dot) {
|
||||
assert(path);
|
||||
assert(prefix);
|
||||
|
||||
@@ -807,7 +807,7 @@ int fsck_exists_for_fstype(const char *fstype) {
|
||||
return executable_is_good(checker);
|
||||
}
|
||||
|
||||
static const char *skip_slash_or_dot(const char *p) {
|
||||
static const char* skip_slash_or_dot(const char *p) {
|
||||
for (; !isempty(p); p++) {
|
||||
if (*p == '/')
|
||||
continue;
|
||||
@@ -891,7 +891,7 @@ int path_find_first_component(const char **p, bool accept_dot_dot, const char **
|
||||
return len;
|
||||
}
|
||||
|
||||
static const char *skip_slash_or_dot_backward(const char *path, const char *q) {
|
||||
static const char* skip_slash_or_dot_backward(const char *path, const char *q) {
|
||||
assert(path);
|
||||
assert(!q || q >= path);
|
||||
|
||||
@@ -1000,7 +1000,7 @@ int path_find_last_component(const char *path, bool accept_dot_dot, const char *
|
||||
return len;
|
||||
}
|
||||
|
||||
const char *last_path_component(const char *path) {
|
||||
const char* last_path_component(const char *path) {
|
||||
|
||||
/* Finds the last component of the path, preserving the optional trailing slash that signifies a directory.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user