From a365b83da3bfb61e1b3270fce77de60c90ac121c Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 21 Dec 2009 10:46:20 +0100 Subject: [PATCH] Make integers unsigned 32-bit, rather than signed --- src/main/evaluate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/evaluate.c b/src/main/evaluate.c index cbef0e3..6fae2be 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 { -- 2.1.4