]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: always use "int" to display exit status values
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Jul 2019 17:14:09 +0000 (19:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 29 Jul 2019 17:14:09 +0000 (19:14 +0200)
That's what it actually is, hence let's use that and cast when the type
is bigger.

src/analyze/analyze.c

index 45e41fedee2b9dc33ee06e90a7f8ee1ea286c863..199d49f5b93574e4cb56b00427e18f333579798d 100644 (file)
@@ -1653,7 +1653,7 @@ static int dump_exit_codes(int argc, char *argv[], void *userdata) {
 
                         r = table_add_many(table,
                                            TABLE_STRING, exit_status_mappings[i].name,
-                                           TABLE_UINT, i,
+                                           TABLE_INT, (int) i,
                                            TABLE_STRING, exit_status_class(i));
                         if (r < 0)
                                 return r;
@@ -1669,7 +1669,7 @@ static int dump_exit_codes(int argc, char *argv[], void *userdata) {
                         assert(code >= 0 && (size_t) code < ELEMENTSOF(exit_status_mappings));
                         r = table_add_many(table,
                                            TABLE_STRING, exit_status_mappings[code].name ?: "-",
-                                           TABLE_UINT, code,
+                                           TABLE_INT, code,
                                            TABLE_STRING, exit_status_class(code) ?: "-");
                         if (r < 0)
                                 return r;