summaryrefslogtreecommitdiff
path: root/src/sysusers
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
commit63c372cb9df3bee01e3bf8cd7f96f336bddda846 (patch)
treebf4d1b6e41f72927a2b58e7dd21daa0c496aaa96 /src/sysusers
parent44de0efc6e406515fc1cf8b95d9655d0d7f7ffff (diff)
downloadsystemd-63c372cb9df3bee01e3bf8cd7f96f336bddda846.tar.gz
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
Diffstat (limited to 'src/sysusers')
-rw-r--r--src/sysusers/sysusers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index f25ece0674..e47bcb4dca 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -81,7 +81,7 @@ static uid_t search_uid = UID_INVALID;
static UidRange *uid_range = NULL;
static unsigned n_uid_range = 0;
-#define fix_root(x) (arg_root ? strappenda(arg_root, x) : x)
+#define fix_root(x) (arg_root ? strjoina(arg_root, x) : x)
static int load_user_database(void) {
_cleanup_fclose_ FILE *f = NULL;
@@ -217,7 +217,7 @@ static int make_backup(const char *target, const char *x) {
/* Don't fail on chmod() or chown(). If it stays owned by us
* and/or unreadable by others, then it isn't too bad... */
- backup = strappenda(x, "-");
+ backup = strjoina(x, "-");
/* Copy over the access mask */
if (fchmod(fileno(dst), st.st_mode & 07777) < 0)