-/* $Id: dbm_map.c,v 1.6 2016/10/20 16:12:56 schwarze Exp $ */
+/* $Id: dbm_map.c,v 1.8 2017/02/17 14:43:54 schwarze Exp $ */
/*
* Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
*
max_offset = be32toh(*dbm_getint(3)) + sizeof(int32_t);
if (st.st_size != max_offset) {
warnx("dbm_map(%s): Inconsistent file size %lld (expected %d)",
- fname, st.st_size, max_offset);
+ fname, (long long)st.st_size, max_offset);
errno = EFTYPE;
goto fail;
}
int32_t
dbm_addr(const void *p)
{
- return htobe32((char *)p - dbm_base);
+ return htobe32((const char *)p - dbm_base);
}
int