@@ -83,7 +83,7 @@ typedef struct blkid_struct_tag *blkid_tag;
#define BLKID_PROBE_INTERVAL 200
/* This describes an entire blkid cache file and probed devices.
- * We can traverse all of the found devices via bic_list.
+ * We can traverse all of the found devices via bic_devs.
* We can traverse all of the tag types by bic_tags, which hold empty tags
* for each tag type. Those tags can be used as list_heads for iterating
* through all devices with a specific tag type (e.g. LABEL).
@@ -105,7 +105,7 @@ int blkid_get_cache(blkid_cache *ret_cache, const char *filename)
INIT_LIST_HEAD(&cache->bic_tags);
if (filename && !strlen(filename))
- filename = 0;
+ filename = NULL;
if (!filename)
filename = safe_getenv("BLKID_FILE");
if (!filename)
@@ -415,7 +415,7 @@ void blkid_read_cache(blkid_cache cache)
unsigned int end;
lineno++;
- if (buf[0] == 0)
+ if (buf[0] == '\0')
continue;
end = strlen(buf) - 1;
/* Continue reading next line if it ends with a backslash */
NULL for pointers and '\0' for chars are more proper than 0. Also fix a comment to match the code, bic_list should be bic_devs. Signed-off-by: Eryu Guan <guaneryu@gmail.com> --- lib/blkid/blkidP.h | 2 +- lib/blkid/cache.c | 2 +- lib/blkid/read.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)