diff options
Diffstat (limited to 'subopt-helper.c')
-rw-r--r-- | subopt-helper.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/subopt-helper.c b/subopt-helper.c index ad133772af..fa96ea5052 100644 --- a/subopt-helper.c +++ b/subopt-helper.c @@ -300,18 +300,16 @@ static char const * parse_str( char const * str, strarg_t * const valp ) /*** common test functions ***/ /** \brief Test if i is not negative */ -int int_non_neg( int * i ) +int int_non_neg(void *iptr) { - if ( *i < 0 ) { return 0; } - - return 1; + int *i = iptr; + return *i >= 0; } /** \brief Test if i is positive. */ -int int_pos( int * i ) +int int_pos(void *iptr) { - if ( *i > 0 ) { return 1; } - - return 0; + int *i = iptr; + return *i > 0; } /*** little helpers */ |