diff options
author | Christian Kohlstedde <christian@kohlsted.de> | 2015-02-18 22:11:16 +0100 |
---|---|---|
committer | Christian Kohlstedde <christian@kohlsted.de> | 2015-02-18 22:11:16 +0100 |
commit | 014e66563f2c988b07f1d168d7d673ff95c0c8a7 (patch) | |
tree | 402ea95c398b648343b22cb46925e33c9d33b61c /src | |
parent | e70ea4247fd9eefcdd3f80fdc8a045257d196fcb (diff) |
Make the code more readable.
Diffstat (limited to 'src')
-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; } |