chiark / gitweb /
sd-rtnl: improve detection of broadcast messages
[elogind.git] / src / cgtop / cgtop.c
index 79592aaa171874660f37e9288df4ecf35962a3aa..f951c37cbcb4299330bc6790b17651923a9b82cf 100644 (file)
@@ -447,7 +447,7 @@ static int display(Hashmap *a) {
         Group *g;
         Group **array;
         signed path_columns;
-        unsigned rows, n = 0, j, maxtcpu = 0, maxtpath = 0;
+        unsigned rows, n = 0, j, maxtcpu = 0, maxtpath = 3; /* 3 for ellipsize() to work properly */
         char buffer[MAX3(21, FORMAT_BYTES_MAX, FORMAT_TIMESPAN_MAX)];
 
         assert(a);
@@ -748,7 +748,7 @@ int main(int argc, char *argv[]) {
                         if (r == -ETIMEDOUT)
                                 continue;
                         if (r < 0) {
-                                log_error_errno(-r, "Couldn't read key: %m");
+                                log_error_errno(r, "Couldn't read key: %m");
                                 goto finish;
                         }
                 }
@@ -842,7 +842,7 @@ finish:
         group_hashmap_free(b);
 
         if (r < 0) {
-                log_error_errno(-r, "Exiting with failure: %m");
+                log_error_errno(r, "Exiting with failure: %m");
                 return EXIT_FAILURE;
         }