change strncmp() == 0 to STREQLEN()
[libguestfs.git] / daemon / daemon.h
index 1cdb480..ac68479 100644 (file)
@@ -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);                                           \