From 627f89351d06e43564b47ea42cabaa522284c2a1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 9 Nov 2009 14:21:46 +0100 Subject: change strncmp(...) != 0 to STRNEQLEN(...) git grep -l 'strncmp *([^=]*!= *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *!= *0/STRNEQLEN$1/g' --- daemon/guestfsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'daemon/guestfsd.c') diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index d16826f0..61a62368 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -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) */ -- cgit