Commit 49e52a1d authored by Claes Sjofors's avatar Claes Sjofors

LONG_MIN/MAX changed to INT

parent c92ff929
...@@ -690,8 +690,8 @@ cdh_StringToAttrValue ( ...@@ -690,8 +690,8 @@ cdh_StringToAttrValue (
case pwr_eType_Int32: case pwr_eType_Int32:
if (*String != '\0') { if (*String != '\0') {
i32val = strtol(String, &endp, 0); i32val = strtol(String, &endp, 0);
if (errno == ERANGE || *endp != '\0' || i32val > LONG_MAX || if (errno == ERANGE || *endp != '\0' || i32val > INT_MAX ||
i32val < LONG_MIN i32val < INT_MIN
) { ) {
sts = CDH__INVINT32; sts = CDH__INVINT32;
break; break;
......
...@@ -65,7 +65,7 @@ extern "C" { ...@@ -65,7 +65,7 @@ extern "C" {
#define cdh_cMaxBix 7 #define cdh_cMaxBix 7
#define cdh_cMaxTix 2047 #define cdh_cMaxTix 2047
#define cdh_cMaxTyg 1 #define cdh_cMaxTyg 1
#define cdh_cMaxOix ULONG_MAX #define cdh_cMaxOix UINT_MAX
typedef enum { typedef enum {
cdh_eVid3_local = 1, cdh_eVid3_local = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment