From 94e2570c2f862f85e02ffe3c957cc47844f43e9d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 27 May 2017 03:20:47 +0200 Subject: [PATCH] Cleanups --- cores/libretro-ffmpeg/ffmpeg_fft.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cores/libretro-ffmpeg/ffmpeg_fft.c b/cores/libretro-ffmpeg/ffmpeg_fft.c index 2bc21c99c1..391ef72c17 100644 --- a/cores/libretro-ffmpeg/ffmpeg_fft.c +++ b/cores/libretro-ffmpeg/ffmpeg_fft.c @@ -153,8 +153,6 @@ typedef float stub_matrix4x4[4][4]; static INLINE unsigned log2i(unsigned x) { unsigned res; - if (x==0) - return 0; /* shouldn't happen */ for (res = 0; x; x >>= 1) res++; @@ -164,8 +162,8 @@ static INLINE unsigned log2i(unsigned x) static INLINE unsigned bitinverse(unsigned x, unsigned size) { unsigned i; - unsigned size_log2 = log2i(size); - unsigned ret = 0; + unsigned size_log2 = (size == 0) ? 0 : log2i(size); + unsigned ret = 0; for (i = 0; i < size_log2; i++) ret |= ((x >> i) & 0x1) << (size_log2 - 1 - i);