X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/e4c83815ad1c33d67a9d2078e7eebbbeeb00dd15..5325cd99ac197268bd26af0ee01d0539cb78cb61:/dbm_map.c diff --git a/dbm_map.c b/dbm_map.c index 2207b555..87c085d2 100644 --- a/dbm_map.c +++ b/dbm_map.c @@ -1,4 +1,4 @@ -/* $Id: dbm_map.c,v 1.5 2016/08/30 21:37:24 schwarze Exp $ */ +/* $Id: dbm_map.c,v 1.8 2017/02/17 14:43:54 schwarze Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * @@ -100,8 +100,8 @@ dbm_map(const char *fname) } max_offset = be32toh(*dbm_getint(3)) + sizeof(int32_t); if (st.st_size != max_offset) { - warnx("dbm_map(%s): Inconsistent file size %llu (expected %d)", - fname, st.st_size, max_offset); + warnx("dbm_map(%s): Inconsistent file size %lld (expected %d)", + fname, (long long)st.st_size, max_offset); errno = EFTYPE; goto fail; } @@ -175,7 +175,7 @@ dbm_getint(int32_t offset) int32_t dbm_addr(const void *p) { - return htobe32((char *)p - dbm_base); + return htobe32((const char *)p - dbm_base); } int