The for loop also checks the length. Nothing will happen if length is zero as expected. Signed-off-by: Joe van Tunen <joevt@xxxxxxx> --- edid-decode.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/edid-decode.cpp b/edid-decode.cpp index d5062dd..d77646d 100644 --- a/edid-decode.cpp +++ b/edid-decode.cpp @@ -700,9 +700,6 @@ void hex_block(const char *prefix, const unsigned char *x, { unsigned i, j; - if (!length) - return; - for (i = 0; i < length; i += step) { unsigned len = min(step, length - i); -- 2.24.3 (Apple Git-128)