Browse Source

- don't check for LLONG_MAX, LLONG_MIN, as some gcc don't provide this,
checking for ERANGE is enough, reported from Klaus


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4941 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 17 years ago
parent
commit
cc6c7a5f32
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/srdb1/db_ut.c

+ 2 - 1
lib/srdb1/db_ut.c

@@ -35,6 +35,7 @@
 #include "../mem/mem.h"
 #include "../mem/mem.h"
 #include "../dprint.h"
 #include "../dprint.h"
 #include <limits.h>
 #include <limits.h>
+#include </usr/include/limits.h>
 #include <errno.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
@@ -72,7 +73,7 @@ inline int db_str2longlong(const char* _s, long long * _v)
 	}
 	}
 
 
 	tmp = strtoll(_s, 0, 10);
 	tmp = strtoll(_s, 0, 10);
-	if ((tmp == LLONG_MAX || tmp == LLONG_MIN) && errno == ERANGE) {
+	if (errno == ERANGE) {
 		LM_ERR("Value out of range\n");
 		LM_ERR("Value out of range\n");
 		return -1;
 		return -1;
 	}
 	}