X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fext2.c;h=f768440d796532857eb68628c37173c51b8c9b46;hb=bdfb1bddffa48cfb486331166b8aed91637cb0d6;hp=0021a0657b35e7710f421cea57fcb4fab1dc0776;hpb=6a14f1c2502f58ff7bed8cb451f95a83f5ee920a;p=libguestfs.git diff --git a/daemon/ext2.c b/daemon/ext2.c index 0021a06..f768440 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -48,7 +48,7 @@ do_tune2fs_l (const char *device) p = out; /* Discard the first line if it contains "tune2fs ...". */ - if (strncmp (p, "tune2fs ", 8) == 0) { + if (STREQLEN (p, "tune2fs ", 8)) { p = strchr (p, '\n'); if (p) p++; else { @@ -78,9 +78,9 @@ do_tune2fs_l (const char *device) free (out); return NULL; } - if (strcmp (colon, "") == 0 || - strcmp (colon, "") == 0 || - strcmp (colon, "(none)") == 0) { + if (STREQ (colon, "") || + STREQ (colon, "") || + STREQ (colon, "(none)")) { if (add_string (&ret, &size, &alloc, "") == -1) { free (out); return NULL;