X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6c42153ad9362cc676ea66563bf400d7511b3b68..f95d466465fffebda03aa078fa495f28f623be2d:/sbr/m_atoi.c diff --git a/sbr/m_atoi.c b/sbr/m_atoi.c index 221ff0ca..da6730df 100644 --- a/sbr/m_atoi.c +++ b/sbr/m_atoi.c @@ -4,8 +4,6 @@ * -- return the numeric value of the message. If the string * -- contains any non-digit characters, then return 0. * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -21,11 +19,7 @@ m_atoi (char *str) char *cp; for (i = 0, cp = str; *cp; cp++) { -#ifdef LOCALE - if (!isdigit(*cp)) -#else - if (*cp < '0' || *cp > '9') -#endif + if (!isdigit((unsigned char) *cp)) return 0; i *= 10;