From 9578fd1f7b49b8d6c0dbdd02673814eaf8099aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 8 Aug 2017 17:38:51 +0200 Subject: [PATCH] vaapiencode: h264: remove spurious code Coverity scan bug: An unsigned value can never be negative, so this test will always evaluate the same way. As len is guint32, there is no need to check it if it is equal or bigger than zero. --- gst/vaapi/gstvaapiencode_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapiencode_h264.c b/gst/vaapi/gstvaapiencode_h264.c index 949038c15a..f963de943f 100644 --- a/gst/vaapi/gstvaapiencode_h264.c +++ b/gst/vaapi/gstvaapiencode_h264.c @@ -512,7 +512,7 @@ _h264_byte_stream_next_nal (guint8 * buffer, guint32 len, guint32 * nal_size) guint32 flag = 0xFFFFFFFF; guint32 nal_start_len = 0; - g_assert (len >= 0 && buffer && nal_size); + g_assert (buffer && nal_size); if (len < 3) { *nal_size = len; nal_start = (len ? buffer : NULL);