Commit 932c0df2 authored by Pauli's avatar Pauli
Browse files

Avoid a self-assignment.



Clang is generating a warning over an assignment of a variable to itself.
This occurs on an ASCII based machine where the convert to ASCII macro doesn't
do anything.  The fix is to introduce a temporary variable.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4214)
parent 9c481c2f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -251,9 +251,9 @@ int ossl_fromascii(int c)
int ossl_ctype_check(int c, unsigned int mask)
{
    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
    const int a = ossl_toascii(c);

    c = ossl_toascii(c);
    return c >= 0 && c < max && (ctype_char_map[c] & mask) != 0;
    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
}

#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)