X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/ebd515705cd44f744240e095a723a476fb6a95ef..67dcc2e5b969bc3dc00fcdd852cb6fd4ed9a2107:/dba.c diff --git a/dba.c b/dba.c index bb1539b7..ee43933d 100644 --- a/dba.c +++ b/dba.c @@ -1,4 +1,4 @@ -/* $Id: dba.c,v 1.9 2017/01/15 15:28:55 schwarze Exp $ */ +/* $Id: dba.c,v 1.10 2017/02/17 14:43:54 schwarze Exp $ */ /* * Copyright (c) 2016, 2017 Ingo Schwarze * @@ -315,8 +315,8 @@ compare_names(const void *vp1, const void *vp2) const char *cp1, *cp2; int diff; - cp1 = *(char **)vp1; - cp2 = *(char **)vp2; + cp1 = *(const char * const *)vp1; + cp2 = *(const char * const *)vp2; return (diff = *cp2 - *cp1) ? diff : strcasecmp(cp1 + 1, cp2 + 1); } @@ -326,8 +326,8 @@ compare_strings(const void *vp1, const void *vp2) { const char *cp1, *cp2; - cp1 = *(char **)vp1; - cp2 = *(char **)vp2; + cp1 = *(const char * const *)vp1; + cp2 = *(const char * const *)vp2; return strcmp(cp1, cp2); } @@ -502,7 +502,7 @@ compare_entries(const void *vp1, const void *vp2) { const struct macro_entry *ep1, *ep2; - ep1 = *(struct macro_entry **)vp1; - ep2 = *(struct macro_entry **)vp2; + ep1 = *(const struct macro_entry * const *)vp1; + ep2 = *(const struct macro_entry * const *)vp2; return strcmp(ep1->value, ep2->value); }