Skip to content

Commit 948f2bc

Browse files
committed
use INT_MAX, rather than SCL's 32-bit MAXINT
1 parent fb45e4e commit 948f2bc

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

include/express/expr.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef EXPRESSION_H
22
#define EXPRESSION_H
33

4-
/** **********************************************************************
4+
/*********************************************************************//**
55
** Module: Expression \file expr.h
66
** Description: This module implements the Expression abstraction.
77
** Several types of expressions are supported: identifiers,
@@ -64,10 +64,6 @@
6464
#include <math.h>
6565
#include "expbasic.h" /* get basic definitions */
6666

67-
#ifndef MAXINT
68-
#define MAXINT (~(1 << 31))
69-
#endif
70-
7167
/************/
7268
/* typedefs */
7369
/************/

src/express/expr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
#include "express/resolve.h"
8282

8383
#include <assert.h>
84+
#include <limits.h>
8485

8586
#ifdef YYDEBUG
8687
extern int yydebug;
@@ -167,7 +168,7 @@ void EXPinitialize( void ) {
167168
resolved_all( LITERAL_PI );
168169

169170
LITERAL_INFINITY = EXPcreate_simple( Type_Integer );
170-
LITERAL_INFINITY->u.integer = MAXINT;
171+
LITERAL_INFINITY->u.integer = INT_MAX;
171172
resolved_all( LITERAL_INFINITY );
172173

173174
LITERAL_ZERO = EXPcreate_simple( Type_Integer );

0 commit comments

Comments
 (0)