summaryrefslogtreecommitdiffstats
path: root/subopt-helper.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-08 01:05:30 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-08 01:05:30 +0200
commit231b33a02fae95b260120349040106bfa34a3750 (patch)
tree23c4de0e6263b2d99966348d7003177b3b3e3740 /subopt-helper.c
parent52126e574c7872ca95e7974cfe5445421b74f24c (diff)
parent92cd6dc3e916ae4275ff05d2b238fc778cfbfc6b (diff)
downloadmpv-231b33a02fae95b260120349040106bfa34a3750.tar.bz2
mpv-231b33a02fae95b260120349040106bfa34a3750.tar.xz
Merge svn changes up to r30165
Diffstat (limited to 'subopt-helper.c')
-rw-r--r--subopt-helper.c14
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 */