]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence negative array index warning with toupper
authorMark Andrews <marka@isc.org>
Fri, 19 Aug 2022 01:13:59 +0000 (11:13 +1000)
committerMark Andrews <marka@isc.org>
Fri, 19 Aug 2022 01:16:00 +0000 (11:16 +1000)
Cast to (unsigned char).

lib/isccfg/duration.c

index 27dddca1cc2342560be5034486443a475378971f..305047e1af13edc85662732a99ab8413474da1d3 100644 (file)
@@ -63,7 +63,7 @@ isccfg_duration_fromtext(isc_textregion_t *source,
        duration->unlimited = false;
 
        /* Every duration starts with 'P' */
-       if (toupper(str[0]) != 'P') {
+       if (toupper((unsigned char)str[0]) != 'P') {
                return (ISC_R_BADNUMBER);
        }
        P = str;