From: Hallvard B Furuseth Date: Fri, 19 Aug 2011 06:45:57 +0000 (+0200) Subject: Avoid cast-away-const for errstr[] X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~83 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ca496bd357bf945c51c2f542bab110724f22d71d;p=openldap Avoid cast-away-const for errstr[] --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 84c4482267..c6ce7a7dd3 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -465,7 +465,7 @@ mdb_version(int *maj, int *min, int *pat) return MDB_VERSION_STRING; } -static const char *errstr[] = { +static char *const errstr[] = { "MDB_KEYEXIST: Key/data pair already exists", "MDB_NOTFOUND: No matching key/data pair found", "MDB_PAGE_NOTFOUND: Requested page not found", @@ -481,7 +481,7 @@ mdb_strerror(int err) return ("Successful return: 0"); if (err >= MDB_KEYEXIST && err <= MDB_VERSION_MISMATCH) - return (char *)errstr[err - MDB_KEYEXIST]; + return errstr[err - MDB_KEYEXIST]; return strerror(err); }