Browse code

lib/srdb1: cast for signed comparison

Daniel-Constantin Mierla authored on 15/08/2018 14:45:38
Showing 1 changed files
... ...
@@ -113,7 +113,7 @@ int db_str2uint(const char* _s, unsigned int* _v)
113 113
 
114 114
 	tmp = strtoul(_s, &p, 10);
115 115
 	if ((tmp == ULONG_MAX && errno == ERANGE) ||
116
-				(tmp < INT_MIN) || (tmp > UINT_MAX)) {
116
+				((long)tmp < INT_MIN) || (tmp > UINT_MAX)) {
117 117
 		LM_ERR("Value out of range\n");
118 118
 		return -1;
119 119
 	}