From: Alan T. DeKok Date: Mon, 21 Dec 2009 09:46:20 +0000 (+0100) Subject: Make integers unsigned 32-bit, rather than signed X-Git-Tag: release_2_1_8~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=224b42a237df44e5ea81ddc50f31c72cf25a0736;p=thirdparty%2Ffreeradius-server.git Make integers unsigned 32-bit, rather than signed --- diff --git a/src/main/evaluate.c b/src/main/evaluate.c index cbef0e314bc..6fae2bef28a 100644 --- a/src/main/evaluate.c +++ b/src/main/evaluate.c @@ -303,7 +303,7 @@ static int radius_do_cmp(REQUEST *request, int *presult, int cflags, int modreturn) { int result; - int lint, rint; + uint32_t lint, rint; VALUE_PAIR *vp = NULL; #ifdef HAVE_REGEX_H char buffer[1024]; @@ -408,12 +408,12 @@ static int radius_do_cmp(REQUEST *request, int *presult, RDEBUG2(" (Right field is not a number at: %s)", pright); return FALSE; } - rint = atoi(pright); + rint = strtoul(pright, NULL, 0); if (!all_digits(pleft)) { RDEBUG2(" (Left field is not a number at: %s)", pleft); return FALSE; } - lint = atoi(pleft); + lint = strtoul(pleft, NULL, 0); break; default: @@ -427,7 +427,7 @@ static int radius_do_cmp(REQUEST *request, int *presult, * Check for truth or falsehood. */ if (all_digits(pleft)) { - lint = atoi(pleft); + lint = strtoul(pleft, NULL, 0); result = (lint != 0); } else {