diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-07-13 13:41:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-13 13:41:01 +0200 |
commit | b7def684941808600c344f0be7a2b9fcdda97e0f (patch) | |
tree | d28516d55a035ae9f754cb21e6d97eb3d0e21e27 /src/shared | |
parent | 184850e8a741beb795f6ea66091f3fb176fce880 (diff) |
util: rename join() to strjoin()
This is to match strappend() and the other string related functions.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/cgroup-util.c | 10 | ||||
-rw-r--r-- | src/shared/conf-parser.c | 2 | ||||
-rw-r--r-- | src/shared/hwclock.c | 2 | ||||
-rw-r--r-- | src/shared/path-util.c | 2 | ||||
-rw-r--r-- | src/shared/unit-name.c | 4 | ||||
-rw-r--r-- | src/shared/util.c | 4 | ||||
-rw-r--r-- | src/shared/util.h | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 6740d3b885..b0d378de5a 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -522,16 +522,16 @@ static int join_path(const char *controller, const char *path, const char *suffi if (controller) { if (path && suffix) - t = join("/sys/fs/cgroup/", controller, "/", path, "/", suffix, NULL); + t = strjoin("/sys/fs/cgroup/", controller, "/", path, "/", suffix, NULL); else if (path) - t = join("/sys/fs/cgroup/", controller, "/", path, NULL); + t = strjoin("/sys/fs/cgroup/", controller, "/", path, NULL); else if (suffix) - t = join("/sys/fs/cgroup/", controller, "/", suffix, NULL); + t = strjoin("/sys/fs/cgroup/", controller, "/", suffix, NULL); else - t = join("/sys/fs/cgroup/", controller, NULL); + t = strjoin("/sys/fs/cgroup/", controller, NULL); } else { if (path && suffix) - t = join(path, "/", suffix, NULL); + t = strjoin(path, "/", suffix, NULL); else if (path) t = strdup(path); } diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 8c62fb959b..1eccec5989 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -90,7 +90,7 @@ int config_item_perf_lookup( else { char *key; - key = join(section, ".", lvalue, NULL); + key = strjoin(section, ".", lvalue, NULL); if (!key) return -ENOMEM; diff --git a/src/shared/hwclock.c b/src/shared/hwclock.c index d40bb2653f..9f8ab08e2b 100644 --- a/src/shared/hwclock.c +++ b/src/shared/hwclock.c @@ -74,7 +74,7 @@ static int rtc_open(int flags) { if (ignore_file(de->d_name)) continue; - p = join("/sys/class/rtc/", de->d_name, "/hctosys", NULL); + p = strjoin("/sys/class/rtc/", de->d_name, "/hctosys", NULL); if (!p) { closedir(d); return -ENOMEM; diff --git a/src/shared/path-util.c b/src/shared/path-util.c index ccd7667608..8bc7955020 100644 --- a/src/shared/path-util.c +++ b/src/shared/path-util.c @@ -120,7 +120,7 @@ char *path_make_absolute(const char *p, const char *prefix) { if (path_is_absolute(p) || !prefix) return strdup(p); - return join(prefix, "/", p, NULL); + return strjoin(prefix, "/", p, NULL); } char *path_make_absolute_cwd(const char *p) { diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 3e437b77a1..fcf5902c78 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -208,7 +208,7 @@ char *unit_name_build(const char *prefix, const char *instance, const char *suff if (!instance) return strappend(prefix, suffix); - return join(prefix, "@", instance, suffix, NULL); + return strjoin(prefix, "@", instance, suffix, NULL); } static char *do_escape_char(char c, char *t) { @@ -425,7 +425,7 @@ char *unit_name_from_path_instance(const char *prefix, const char *path, const c if (!p) return NULL; - r = join(prefix, "@", p, suffix, NULL); + r = strjoin(prefix, "@", p, suffix, NULL); free(p); return r; diff --git a/src/shared/util.c b/src/shared/util.c index 63471899fd..2aabd8d634 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -1083,7 +1083,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char * if (h < 0) return h; - r = join("[", t, "]", NULL); + r = strjoin("[", t, "]", NULL); free(t); if (!r) @@ -5145,7 +5145,7 @@ finish: return r; } -char *join(const char *x, ...) { +char *strjoin(const char *x, ...) { va_list ap; size_t l; char *r, *p; diff --git a/src/shared/util.h b/src/shared/util.h index c8d048f9b2..d9b656d2ca 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -451,7 +451,7 @@ int dirent_ensure_type(DIR *d, struct dirent *de); int in_search_path(const char *path, char **search); int get_files_in_directory(const char *path, char ***list); -char *join(const char *x, ...) _sentinel_; +char *strjoin(const char *x, ...) _sentinel_; bool is_main_thread(void); |