git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Docs: line folding in example.
[libguestfs.git]
/
daemon
/
guestfsd.c
diff --git
a/daemon/guestfsd.c
b/daemon/guestfsd.c
index
d16826f
..
db0bff9
100644
(file)
--- a/
daemon/guestfsd.c
+++ b/
daemon/guestfsd.c
@@
-226,7
+226,7
@@
main (int argc, char *argv[])
/* Connect to vmchannel. */
int sock = -1;
/* Connect to vmchannel. */
int sock = -1;
- if (
strncmp (vmchannel, "tcp:", 4) == 0
) {
+ if (
STREQLEN (vmchannel, "tcp:", 4)
) {
/* Resolve the hostname. */
struct addrinfo *res, *rr;
struct addrinfo hints;
/* Resolve the hostname. */
struct addrinfo *res, *rr;
struct addrinfo hints;
@@
-831,7
+831,7
@@
split_lines (char *str)
int size = 0, alloc = 0;
char *p, *pend;
int size = 0, alloc = 0;
char *p, *pend;
- if (
strcmp (str, "") == 0
)
+ if (
STREQ (str, "")
)
goto empty_list;
p = str;
goto empty_list;
p = str;
@@
-945,7
+945,7
@@
device_name_translation (char *device, const char *func)
}
/* If the name begins with "/dev/sd" then try the alternatives. */
}
/* If the name begins with "/dev/sd" then try the alternatives. */
- if (
strncmp (device, "/dev/sd", 7) != 0
)
+ if (
STRNEQLEN (device, "/dev/sd", 7)
)
goto error;
device[5] = 'h'; /* /dev/hd (old IDE driver) */
goto error;
device[5] = 'h'; /* /dev/hd (old IDE driver) */