chiark / gitweb /
util: make use of isempty() where appropriate
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Nov 2014 20:11:10 +0000 (21:11 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Nov 2014 00:19:56 +0000 (01:19 +0100)
src/shared/util.c

index 39ce46adb4dd19c10d5522f0c61e6271c5ff0426..dc1bc39ac710b50f4f52cd171674bd053d3b20ae 100644 (file)
@@ -695,7 +695,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char *
         }
 
         /* Kernel threads have no argv[] */
         }
 
         /* Kernel threads have no argv[] */
-        if (r == NULL || r[0] == 0) {
+        if (isempty(r)) {
                 _cleanup_free_ char *t = NULL;
                 int h;
 
                 _cleanup_free_ char *t = NULL;
                 int h;