diff libvo/vo_png.c @ 30123:0f5f75b4a015

Simplify range-checking functions for subopt parsing.
author reimar
date Fri, 01 Jan 2010 13:23:16 +0000
parents 1772a5171ac7
children 0a92a14ced38
line wrap: on
line diff
--- a/libvo/vo_png.c	Fri Jan 01 13:18:49 2010 +0000
+++ b/libvo/vo_png.c	Fri Jan 01 13:23:16 2010 +0000
@@ -286,9 +286,7 @@
 static int int_zero_to_nine(void *value)
 {
     int *sh = value;
-    if ( (*sh < 0) || (*sh > 9) )
-        return 0;
-    return 1;
+    return *sh >= 0 && *sh <= 9;
 }
 
 static const opt_t subopts[] = {