summaryrefslogtreecommitdiff
path: root/lib/blkid/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/blkid/read.c')
-rw-r--r--lib/blkid/read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/blkid/read.c b/lib/blkid/read.c
index b07cf795..0a8e3f3c 100644
--- a/lib/blkid/read.c
+++ b/lib/blkid/read.c
@@ -403,10 +403,12 @@ void blkid_read_cache(blkid_cache cache)
while (fgets(buf, sizeof(buf), file)) {
blkid_dev dev;
-
- int end = strlen(buf) - 1;
+ unsigned int end;
lineno++;
+ if (buf[0] == 0)
+ continue;
+ end = strlen(buf) - 1;
/* Continue reading next line if it ends with a backslash */
while (buf[end] == '\\' && end < sizeof(buf) - 2 &&
fgets(buf + end, sizeof(buf) - end, file)) {