]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] make the use of isspace() more portable regarding signedness of char
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 19 Dec 2012 22:24:22 +0000 (14:24 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 19 Dec 2012 22:26:41 +0000 (14:26 -0800)
the old code seems to be rejected in an ARM environment

okayed on jabber.

src/lib/util/encode/base_n.cc

index 0026a0b616cd77bfbbd5277e0d09643c660ee532..c38f9017e9f0aeeb8a64104bc24def5800c2c408 100644 (file)
@@ -291,7 +291,8 @@ BaseNTransformer<BitsPerChunk, BaseZeroCode, Encoder, Decoder>::decode(
                 isc_throw(BadValue, "Too many " << algorithm
                           << " padding characters: " << input);
             }
-        } else if (ch < 0 || !isspace(ch)) {
+        } else if (!(ch > 0 && isspace(ch))) {
+            // see the note for DecodeNormalizer::skipSpaces() above for ch > 0
             break;
         }
         ++srit;