]> git.sur5r.net Git - i3/i3status/blobdiff - src/print_disk_info.c
Make the code more readable.
[i3/i3status] / src / print_disk_info.c
index a9fcba379aad0e9770551bc9653b4bbf6deb09cd..ef028bdf3bd710c8d4ae9896fec35744be28c524 100644 (file)
@@ -131,7 +131,7 @@ void print_disk_info(yajl_gen json_gen, char *buffer, const char *path, const ch
         struct mntent *m;
         bool found = false;
 
-        while ((m = getmntent(mntentfile))) {
+        while (NULL != (m = getmntent(mntentfile))) {
                 if (strcmp(m->mnt_dir, path) == 0) {
                         found = true;
                         break;
@@ -139,8 +139,8 @@ void print_disk_info(yajl_gen json_gen, char *buffer, const char *path, const ch
         }
         endmntent(mntentfile);
 
-        if(!found) {
-                *outwalk = '\0';
+        if (!found) {
+                *buffer = '\0';
                 OUTPUT_FULL_TEXT(buffer);
                 return;
         }