aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/strutils.h6
-rw-r--r--lib/strutils.c10
-rw-r--r--lib/strv.c2
-rw-r--r--libmount/src/tab.c2
-rw-r--r--misc-utils/getopt.c2
-rw-r--r--misc-utils/logger.c4
-rw-r--r--sys-utils/ipcutils.c2
7 files changed, 14 insertions, 14 deletions
diff --git a/include/strutils.h b/include/strutils.h
index 2cea6e6e81..db95f79cb8 100644
--- a/include/strutils.h
+++ b/include/strutils.h
@@ -456,9 +456,9 @@ static inline char *ul_next_string(char *p, char *end)
return NULL;
}
-extern char *strnconcat(const char *s, const char *suffix, size_t b);
-extern char *strconcat(const char *s, const char *suffix);
-extern char *strfconcat(const char *s, const char *format, ...)
+extern char *ul_strnconcat(const char *s, const char *suffix, size_t b);
+extern char *ul_strconcat(const char *s, const char *suffix);
+extern char *ul_strfconcat(const char *s, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int strappend(char **a, const char *b);
diff --git a/lib/strutils.c b/lib/strutils.c
index 2316ada11f..f25d8aba1d 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -964,7 +964,7 @@ int streq_paths(const char *a, const char *b)
}
/* concatenate two strings to a new string, the size of the second string is limited by @b */
-char *strnconcat(const char *s, const char *suffix, size_t b)
+char *ul_strnconcat(const char *s, const char *suffix, size_t b)
{
size_t a;
char *r;
@@ -995,13 +995,13 @@ char *strnconcat(const char *s, const char *suffix, size_t b)
}
/* concatenate two strings to a new string */
-char *strconcat(const char *s, const char *suffix)
+char *ul_strconcat(const char *s, const char *suffix)
{
- return strnconcat(s, suffix, suffix ? strlen(suffix) : 0);
+ return ul_strnconcat(s, suffix, suffix ? strlen(suffix) : 0);
}
/* concatenate @s and string defined by @format to a new string */
-char *strfconcat(const char *s, const char *format, ...)
+char *ul_strfconcat(const char *s, const char *format, ...)
{
va_list ap;
char *val, *res;
@@ -1014,7 +1014,7 @@ char *strfconcat(const char *s, const char *format, ...)
if (sz < 0)
return NULL;
- res = strnconcat(s, val, sz);
+ res = ul_strnconcat(s, val, sz);
free(val);
return res;
}
diff --git a/lib/strv.c b/lib/strv.c
index 6946f409b1..bd006e353a 100644
--- a/lib/strv.c
+++ b/lib/strv.c
@@ -164,7 +164,7 @@ int ul_strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
UL_STRV_FOREACH(s, b) {
char *v;
- v = strconcat(*s, suffix);
+ v = ul_strconcat(*s, suffix);
if (!v)
return -ENOMEM;
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
index c8433674f9..bde55b73d7 100644
--- a/libmount/src/tab.c
+++ b/libmount/src/tab.c
@@ -1900,7 +1900,7 @@ int __mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_f
src = mnt_fs_get_srcpath(rootfs);
if (fstype && strncmp(fstype, "nfs", 3) == 0 && root) {
/* NFS stores the root at the end of the source */
- src = src2 = strconcat(src, root);
+ src = src2 = ul_strconcat(src, root);
free(root);
root = NULL;
}
diff --git a/misc-utils/getopt.c b/misc-utils/getopt.c
index 4cd3cda3ab..ca68d96483 100644
--- a/misc-utils/getopt.c
+++ b/misc-utils/getopt.c
@@ -279,7 +279,7 @@ static void add_short_options(struct getopt_control *ctl, char *options)
{
free(ctl->optstr);
if (*options != '+' && getenv("POSIXLY_CORRECT"))
- ctl->optstr = strconcat("+", options);
+ ctl->optstr = ul_strconcat("+", options);
else
ctl->optstr = xstrdup(options);
if (!ctl->optstr)
diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index 4883c7e43f..83b39542f6 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -670,7 +670,7 @@ static char *strdup_structured_data_list(struct list_head *ls)
if (!one)
continue;
- res = strconcat(tmp, one);
+ res = ul_strconcat(tmp, one);
free(tmp);
free(one);
}
@@ -688,7 +688,7 @@ static char *get_structured_data_string(struct logger_ctl *ctl)
usr = strdup_structured_data_list(&ctl->user_sds);
if (sys && usr) {
- res = strconcat(sys, usr);
+ res = ul_strconcat(sys, usr);
free(sys);
free(usr);
} else
diff --git a/sys-utils/ipcutils.c b/sys-utils/ipcutils.c
index e3da523b7c..c130103fd8 100644
--- a/sys-utils/ipcutils.c
+++ b/sys-utils/ipcutils.c
@@ -715,7 +715,7 @@ int posix_ipc_msg_get_info(const char *name, struct posix_msg_data **msgds)
}
fclose(f);
- p->mname = strconcat("/", de->d_name);
+ p->mname = ul_strconcat("/", de->d_name);
mqd_t mq = mq_open(p->mname, O_RDONLY);
struct mq_attr attr;