} __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)
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)
for (i = 0; children[i] != 0; ++i) {
name = hivex_node_name (h, children[i]);
if (!name) goto error;
- if (strcasecmp (name, nname) == 0) {
+ if (STRCASEEQ (name, nname)) {
ret = children[i];
break;
}
for (i = 0; values[i] != 0; ++i) {
name = hivex_value_key (h, values[i]);
if (!name) goto error;
- if (strcasecmp (name, key) == 0) {
+ if (STRCASEEQ (name, key)) {
ret = values[i];
break;
}