Return to dbm_map.c CVS log | Up to [cvsweb.bsd.lv] / mandoc |
version 1.4, 2016/08/22 16:07:16 | version 1.5, 2016/08/30 21:37:24 | ||
---|---|---|---|
|
|
||
dbm_get(int32_t offset) | dbm_get(int32_t offset) | ||
{ | { | ||
offset = be32toh(offset); | offset = be32toh(offset); | ||
if (offset < 0 || offset >= max_offset) { | if (offset < 0) { | ||
warnx("dbm_get: Database corrupt: offset %d", offset); | |||
return NULL; | |||
} | |||
if (offset >= max_offset) { | |||
warnx("dbm_get: Database corrupt: offset %d > %d", | warnx("dbm_get: Database corrupt: offset %d > %d", | ||
offset, max_offset); | offset, max_offset); | ||
return NULL; | return NULL; |