X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fguestfsd.c;h=db0bff926de99cb89d4003e6c5ed3c9a9917aa42;hb=b296287daf9b884aa38646717725f5a389f96ca5;hp=d16826f04165f7f0d9420934349277d2a5e15283;hpb=e645763007e7097c14c1c3ba94010f2e32e536bf;p=libguestfs.git diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index d16826f..db0bff9 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -226,7 +226,7 @@ main (int argc, char *argv[]) /* 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; @@ -831,7 +831,7 @@ split_lines (char *str) int size = 0, alloc = 0; char *p, *pend; - if (strcmp (str, "") == 0) + if (STREQ (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 (strncmp (device, "/dev/sd", 7) != 0) + if (STRNEQLEN (device, "/dev/sd", 7)) goto error; device[5] = 'h'; /* /dev/hd (old IDE driver) */