X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fdaemon.h;h=ac6847927116bb3c89f5f28411b4fe1810b5dd68;hb=0d5b38f1d957609f3f96739507f491a6672f01d5;hp=3f4c4807b6914aa109dc6c350637e98d3df55be9;hpb=7cd4b6aeee3693463b03608a31cf53f21152c2e8;p=libguestfs.git diff --git a/daemon/daemon.h b/daemon/daemon.h index 3f4c480..ac68479 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -164,7 +164,7 @@ extern void reply (xdrproc_t xdrp, char *ret); */ #define RESOLVE_DEVICE(path,fail_stmt) \ do { \ - if (strncmp ((path), "/dev/", 5) != 0) { \ + if (STRNEQLEN ((path), "/dev/", 5)) { \ reply_with_error ("%s: %s: expecting a device name", __func__, (path)); \ fail_stmt; \ } \ @@ -184,7 +184,7 @@ extern void reply (xdrproc_t xdrp, char *ret); */ #define REQUIRE_ROOT_OR_RESOLVE_DEVICE(path,fail_stmt) \ do { \ - if (strncmp ((path), "/dev/", 5) == 0) \ + if (STREQLEN ((path), "/dev/", 5)) \ RESOLVE_DEVICE ((path), fail_stmt); \ else { \ NEED_ROOT (fail_stmt); \