summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/recorder/jpeg_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/recorder/jpeg_common.h b/apps/recorder/jpeg_common.h
index c2abce8f49..de998f1ddd 100644
--- a/apps/recorder/jpeg_common.h
+++ b/apps/recorder/jpeg_common.h
@@ -83,8 +83,8 @@ union uint8_rgbyuv {
static inline int clamp_component(int x)
{
- if ((unsigned)x > 255)
- x = x < 0 ? 0 : 255;
+ if(x > 255) return 255;
+ if(x < 0) return 0;
return x;
}
#include <debug.h>