From 23880ec874b020244b8618bd78984b0b597ce472 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Fri, 9 Jan 2015 15:28:06 +0000 Subject: [PATCH] video-resampler: remove check for below zero for unsigned value CLAMP checks both if n_taps is '< 0' and '> max_taps'. n_taps will never be a negative number because it is an unsigned integer. Removing that check and only making sure it isn't set bigger than max. CID 1256558 --- gst-libs/gst/video/video-resampler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-resampler.c b/gst-libs/gst/video/video-resampler.c index 4b6be03..bd52640 100644 --- a/gst-libs/gst/video/video-resampler.c +++ b/gst-libs/gst/video/video-resampler.c @@ -344,7 +344,7 @@ gst_video_resampler_init (GstVideoResampler * resampler, } max_taps = GET_OPT_MAX_TAPS (options); - n_taps = CLAMP (n_taps, 0, max_taps); + n_taps = MIN (n_taps, max_taps); switch (method) { case GST_VIDEO_RESAMPLER_METHOD_NEAREST: -- 2.7.4