diff options
-rw-r--r-- | src/print_disk_info.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/print_disk_info.c b/src/print_disk_info.c index a9fcba3..ef028bd 100644 --- a/src/print_disk_info.c +++ b/src/print_disk_info.c @@ -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; } |