aboutsummaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/imath.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/imath.c')
-rw-r--r--contrib/pgcrypto/imath.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c
index 17d90ed0398..6375fd7a889 100644
--- a/contrib/pgcrypto/imath.c
+++ b/contrib/pgcrypto/imath.c
@@ -27,7 +27,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-/* $PostgreSQL: pgsql/contrib/pgcrypto/imath.c,v 1.4 2006/07/19 17:05:50 neilc Exp $ */
+/* $PostgreSQL: pgsql/contrib/pgcrypto/imath.c,v 1.5 2006/09/22 21:39:57 tgl Exp $ */
#include "postgres.h"
#include "px.h"
@@ -1799,7 +1799,7 @@ mp_result mp_int_read_cstring(mp_int z, mp_size radix, const char *str, char **e
return MP_RANGE;
/* Skip leading whitespace */
- while(isspace((int)*str))
+ while(isspace((unsigned char) *str))
++str;
/* Handle leading sign tag (+/-, positive default) */
@@ -3127,10 +3127,10 @@ static int s_ch2val(char c, int r)
{
int out;
- if(isdigit((int)c))
+ if(isdigit((unsigned char)c))
out = c - '0';
- else if(r > 10 && isalpha((int)c))
- out = toupper(c) - 'A' + 10;
+ else if(r > 10 && isalpha((unsigned char) c))
+ out = toupper((unsigned char) c) - 'A' + 10;
else
return -1;
@@ -3151,7 +3151,7 @@ static char s_val2ch(int v, int caps)
char out = (v - 10) + 'a';
if(caps)
- return toupper(out);
+ return toupper((unsigned char) out);
else
return out;
}