Now that the key argument is const we can use this to reduces code
duplication.
return NSS_STATUS_NOTFOUND;
}
- const char *e = h->data + h->off_data + *off;
+ const char *e = key->data + *off;
if (!entry_to_group((struct group_entry *)e, result, buffer, buflen)) {
unmap_file(&f);
errno = ERANGE;
return NSS_STATUS_NOTFOUND;
}
- const char *e = h->data + h->off_data + *off;
+ const char *e = key->data + *off;
if (!entry_to_passwd((struct passwd_entry *)e, result, buffer, buflen)) {
unmap_file(&f);
errno = ERANGE;