chiark / gitweb /
sysusers: fix uninitialized warning
[elogind.git] / src / core / unit-printf.c
index 4e18afab8bb62f989d3acd111657f6641a1bbec7..5bd30f0bf74a7a4e37b07a0797d1d0514f40ac0e 100644 (file)
@@ -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