build: make autogen.sh update .git-module-status, as it should
[libguestfs.git] / hivex / hivex.c
index 8ea2c2b..e47dd23 100644 (file)
@@ -143,7 +143,7 @@ struct ntreg_hbin_block {
 } __attribute__((__packed__));
 
 #define BLOCK_ID_EQ(h,offs,eqid) \
-  (strncmp (((struct ntreg_hbin_block *)((h)->addr + (offs)))->id, (eqid), 2) == 0)
+  (STREQLEN (((struct ntreg_hbin_block *)((h)->addr + (offs)))->id, (eqid), 2))
 
 static size_t
 block_len (hive_h *h, size_t blkoff, int *used)
@@ -235,7 +235,7 @@ hivex_open (const char *filename, int flags)
   h->msglvl = flags & HIVEX_OPEN_MSGLVL_MASK;
 
   const char *debug = getenv ("HIVEX_DEBUG");
-  if (debug && strcmp (debug, "1") == 0)
+  if (debug && STREQ (debug, "1"))
     h->msglvl = 2;
 
   if (h->msglvl >= 2)