git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
generator: Comment and whitespace changes only.
[libguestfs.git]
/
daemon
/
ext2.c
diff --git
a/daemon/ext2.c
b/daemon/ext2.c
index
0021a06
..
f46bac9
100644
(file)
--- a/
daemon/ext2.c
+++ b/
daemon/ext2.c
@@
-20,6
+20,7
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include "../src/guestfs_protocol.h"
#include <unistd.h>
#include "../src/guestfs_protocol.h"
@@
-48,7
+49,7
@@
do_tune2fs_l (const char *device)
p = out;
/* Discard the first line if it contains "tune2fs ...". */
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 {
p = strchr (p, '\n');
if (p) p++;
else {
@@
-78,9
+79,9
@@
do_tune2fs_l (const char *device)
free (out);
return NULL;
}
free (out);
return NULL;
}
- if (
strcmp (colon, "<none>") == 0
||
-
strcmp (colon, "<not available>") == 0
||
-
strcmp (colon, "(none)") == 0
) {
+ if (
STREQ (colon, "<none>")
||
+
STREQ (colon, "<not available>")
||
+
STREQ (colon, "(none)")
) {
if (add_string (&ret, &size, &alloc, "") == -1) {
free (out);
return NULL;
if (add_string (&ret, &size, &alloc, "") == -1) {
free (out);
return NULL;