summaryrefslogtreecommitdiffstats
path: root/hivex
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-11-09 14:26:21 +0100
committerJim Meyering <meyering@redhat.com>2009-11-09 22:34:16 +0100
commit3e70b34eed5a48640e20fbf6dcba774aaace1f3c (patch)
tree5bb681d85d8ff394f562b095e70c36d4ac5f7b5d /hivex
parent627f89351d06e43564b47ea42cabaa522284c2a1 (diff)
downloadlibguestfs-3e70b34eed5a48640e20fbf6dcba774aaace1f3c.tar.gz
libguestfs-3e70b34eed5a48640e20fbf6dcba774aaace1f3c.tar.xz
libguestfs-3e70b34eed5a48640e20fbf6dcba774aaace1f3c.zip
change strncmp() == 0 to STREQLEN()
git grep -l 'strncmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
Diffstat (limited to 'hivex')
-rw-r--r--hivex/hivex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hivex/hivex.c b/hivex/hivex.c
index 8ea2c2b4..4b0deebc 100644
--- a/hivex/hivex.c
+++ b/hivex/hivex.c
@@ -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)