Kaydet (Commit) 8fc65666 authored tarafından Pierre-André Jacquod's avatar Pierre-André Jacquod

cppcheck scope reduction in dmake/getinp.c

üst 2b6ef29f
...@@ -731,7 +731,6 @@ int partcomp( char* lhs, int opcode ) ...@@ -731,7 +731,6 @@ int partcomp( char* lhs, int opcode )
int result, opsind; int result, opsind;
const int localopscount=4; const int localopscount=4;
char* localops[] = { "==", "!=", "<=", ">=" }; char* localops[] = { "==", "!=", "<=", ">=" };
int lint, rint;
#define EQUAL 0 #define EQUAL 0
#define NOTEQUAL 1 #define NOTEQUAL 1
...@@ -817,8 +816,8 @@ int partcomp( char* lhs, int opcode ) ...@@ -817,8 +816,8 @@ int partcomp( char* lhs, int opcode )
if ( rhs && rhs[0] == '"' ) rhs++; if ( rhs && rhs[0] == '"' ) rhs++;
/* Empty strings evaluate to zero. */ /* Empty strings evaluate to zero. */
lint = lhs ? atoi( lhs ) : 0; int lint = lhs ? atoi( lhs ) : 0;
rint = rhs ? atoi( rhs ) : 0; int rint = rhs ? atoi( rhs ) : 0;
result = ( lint >= rint ) ? TRUE : FALSE; result = ( lint >= rint ) ? TRUE : FALSE;
if ( opsind == LESS_EQUAL && lint != rint ) if ( opsind == LESS_EQUAL && lint != rint )
result = !result; result = !result;
......
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