git.annexia.org
/
hivex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39c10cf
)
change strncmp() == 0 to STREQLEN()
author
Jim Meyering
<meyering@redhat.com>
Mon, 9 Nov 2009 13:26:21 +0000
(14:26 +0100)
committer
Richard Jones
<rjones@redhat.com>
Fri, 19 Feb 2010 14:51:01 +0000
(14:51 +0000)
git grep -l 'strncmp *([^=]*== *0'|xargs \
perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
hivex/hivex.c
patch
|
blob
|
history
diff --git
a/hivex/hivex.c
b/hivex/hivex.c
index
8ea2c2b
..
4b0deeb
100644
(file)
--- 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)