diff options
-rw-r--r-- | apps/recorder/jpeg_common.h | 4 |
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 { | |||
83 | 83 | ||
84 | static inline int clamp_component(int x) | 84 | static inline int clamp_component(int x) |
85 | { | 85 | { |
86 | if ((unsigned)x > 255) | 86 | if(x > 255) return 255; |
87 | x = x < 0 ? 0 : 255; | 87 | if(x < 0) return 0; |
88 | return x; | 88 | return x; |
89 | } | 89 | } |
90 | #include <debug.h> | 90 | #include <debug.h> |