summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc@google.com>2020-05-04 11:18:22 -0700
committerWan-Teh Chang <wtc@google.com>2020-05-04 11:21:25 -0700
commit1647d0c62c565c9bbe7ba7d993418a2f1185ca71 (patch)
treefac93933e6f1a588801f0e83b094e7fb6e35dbee
parentb120ba5781a520c015b356a7c77c89545ccdee32 (diff)
downloadlibvpx-1647d0c62c565c9bbe7ba7d993418a2f1185ca71.tar.gz
libvpx-1647d0c62c565c9bbe7ba7d993418a2f1185ca71.tar.bz2
libvpx-1647d0c62c565c9bbe7ba7d993418a2f1185ca71.zip
Remove unneeded null check for entry in for loop
In vpx_codec_control_(), before we enter the for loop, we have already checked if ctx->iface->ctrl_maps is null and handle that as an error. So the for loop can assume ctx->iface->ctrl_maps is not null, which implies 'entry' is not null (both initially and after entry++). Change-Id: Ieafe464d4111fdb77f0586ecfa1835d1cfd44d94
-rw-r--r--vpx/src/vpx_codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vpx/src/vpx_codec.c b/vpx/src/vpx_codec.c
index 10331aa21..114b94e19 100644
--- a/vpx/src/vpx_codec.c
+++ b/vpx/src/vpx_codec.c
@@ -97,7 +97,7 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...) {
res = VPX_CODEC_INCAPABLE;
- for (entry = ctx->iface->ctrl_maps; entry && entry->fn; entry++) {
+ for (entry = ctx->iface->ctrl_maps; entry->fn; entry++) {
if (!entry->ctrl_id || entry->ctrl_id == ctrl_id) {
va_list ap;