chiark / gitweb /
Assorted format fixes
[elogind.git] / src / shared / util.h
index fa16d5252431e4395e64010b760ec7157921902c..179c9615f94fa5f98f3a19fb98803a28b4d5d554 100644 (file)
@@ -69,7 +69,7 @@
 #endif
 
 #if SIZEOF_TIME_T == 8
-#  define PRI_TIME PRIu64
+#  define PRI_TIME PRIi64
 #elif SIZEOF_TIME_T == 4
 #  define PRI_TIME PRIu32
 #else
@@ -380,7 +380,7 @@ static inline uint32_t random_u32(void) {
                         if (!s)                                         \
                                 return log_oom();                       \
                 } else {                                                \
-                        r = asprintf(&s, "%u", i);                      \
+                        r = asprintf(&s, "%i", i);                      \
                         if (r < 0)                                      \
                                 return log_oom();                       \
                 }                                                       \