summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
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/shared/logs-show.c
parent44de0efc6e406515fc1cf8b95d9655d0d7f7ffff (diff)
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/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index b7a99d2c23..45741f9e9d 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -1033,10 +1033,10 @@ int add_matches_for_unit(sd_journal *j, const char *unit) {
assert(j);
assert(unit);
- m1 = strappenda("_SYSTEMD_UNIT=", unit);
- m2 = strappenda("COREDUMP_UNIT=", unit);
- m3 = strappenda("UNIT=", unit);
- m4 = strappenda("OBJECT_SYSTEMD_UNIT=", unit);
+ m1 = strjoina("_SYSTEMD_UNIT=", unit);
+ m2 = strjoina("COREDUMP_UNIT=", unit);
+ m3 = strjoina("UNIT=", unit);
+ m4 = strjoina("OBJECT_SYSTEMD_UNIT=", unit);
(void)(
/* Look for messages from the service itself */
@@ -1080,10 +1080,10 @@ int add_matches_for_user_unit(sd_journal *j, const char *unit, uid_t uid) {
assert(j);
assert(unit);
- m1 = strappenda("_SYSTEMD_USER_UNIT=", unit);
- m2 = strappenda("USER_UNIT=", unit);
- m3 = strappenda("COREDUMP_USER_UNIT=", unit);
- m4 = strappenda("OBJECT_SYSTEMD_USER_UNIT=", unit);
+ m1 = strjoina("_SYSTEMD_USER_UNIT=", unit);
+ m2 = strjoina("USER_UNIT=", unit);
+ m3 = strjoina("COREDUMP_USER_UNIT=", unit);
+ m4 = strjoina("OBJECT_SYSTEMD_USER_UNIT=", unit);
sprintf(muid, "_UID="UID_FMT, uid);
(void) (