From: Richard Jones Date: Sun, 22 Nov 2009 19:14:48 +0000 (+0000) Subject: Use STRPREFIX instead of STREQLEN. X-Git-Tag: 1.0.80~64 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=acdcbac91e9f03333a47204f2a6c52ac03288305;p=libguestfs.git Use STRPREFIX instead of STREQLEN. --- diff --git a/daemon/upload.c b/daemon/upload.c index 7b2ccea..fdb8654 100644 --- a/daemon/upload.c +++ b/daemon/upload.c @@ -40,7 +40,7 @@ do_upload (const char *filename) { int err, fd, r, is_dev; - is_dev = STREQLEN (filename, "/dev/", 5); + is_dev = STRPREFIX (filename, "/dev/"); if (!is_dev) { if (!root_mounted || filename[0] != '/') { cancel_receive (); @@ -93,7 +93,7 @@ do_download (const char *filename) int fd, r, is_dev; char buf[GUESTFS_MAX_CHUNK_SIZE]; - is_dev = STREQLEN (filename, "/dev/", 5); + is_dev = STRPREFIX (filename, "/dev/"); if (!is_dev) CHROOT_IN; fd = open (filename, O_RDONLY);