X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Funit-printf.c;h=5bd30f0bf74a7a4e37b07a0797d1d0514f40ac0e;hp=4e18afab8bb62f989d3acd111657f6641a1bbec7;hb=bce415edcae8e7af8327de8265d621f95fa5426f;hpb=2cfbd749af308bdbe56edcfed7f3eea0fc2b93d2 diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c index 4e18afab8..5bd30f0bf 100644 --- a/src/core/unit-printf.c +++ b/src/core/unit-printf.c @@ -208,7 +208,7 @@ static int specifier_user_name(char specifier, void *data, void *userdata, char if (r < 0) return -ENODATA; - asprintf(&printed, "%lu", (unsigned long) uid); + asprintf(&printed, UID_FMT, uid); } } @@ -231,7 +231,7 @@ static int specifier_user_name(char specifier, void *data, void *userdata, char if (specifier == 'u') printed = strdup(username); else - asprintf(&printed, "%lu", (unsigned long) uid); + asprintf(&printed, UID_FMT, uid); } if (!printed) @@ -369,7 +369,7 @@ int unit_full_printf(Unit *u, const char *format, char **ret) { /* This is similar to unit_name_printf() but also supports * unescaping. Also, adds a couple of additional codes: * - * %f the the instance if set, otherwise the id + * %f the instance if set, otherwise the id * %c cgroup path of unit * %r where units in this slice are placed in the cgroup tree * %R the root of this systemd's instance tree