From 014e66563f2c988b07f1d168d7d673ff95c0c8a7 Mon Sep 17 00:00:00 2001 From: Christian Kohlstedde Date: Wed, 18 Feb 2015 22:11:16 +0100 Subject: Make the code more readable. --- src/print_disk_info.c | 6 +++--- 1 file 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; } -- cgit v1.2.3