diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-01 13:23:16 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-01 13:23:16 +0000 |
commit | 92cd6dc3e916ae4275ff05d2b238fc778cfbfc6b (patch) | |
tree | 199e6ca232ebd36a119a088869329875e175d086 /subopt-helper.c | |
parent | f102ac7a8c62491761b7b3d32baa87dcb665f9ed (diff) | |
download | mpv-92cd6dc3e916ae4275ff05d2b238fc778cfbfc6b.tar.bz2 mpv-92cd6dc3e916ae4275ff05d2b238fc778cfbfc6b.tar.xz |
Simplify range-checking functions for subopt parsing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30165 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subopt-helper.c')
-rw-r--r-- | subopt-helper.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/subopt-helper.c b/subopt-helper.c index e40f9f40d0..6167778b9f 100644 --- a/subopt-helper.c +++ b/subopt-helper.c @@ -303,17 +303,13 @@ static char const * parse_str( char const * str, strarg_t * const valp ) int int_non_neg(void *iptr) { int *i = iptr; - if ( *i < 0 ) { return 0; } - - return 1; + return *i >= 0; } /** \brief Test if i is positive. */ int int_pos(void *iptr) { int *i = iptr; - if ( *i > 0 ) { return 1; } - - return 0; + return *i > 0; } /*** little helpers */ |