diff mbox series

[01/28] edid-decode: remove unnecessary length check

Message ID 20210924233149.10028-2-joevt@shaw.ca (mailing list archive)
State New, archived
Headers show
Series bug fixes, additions, changes | expand

Commit Message

joevt Sept. 24, 2021, 11:31 p.m. UTC
The for loop also checks the length. Nothing will happen if length is zero as expected.

Signed-off-by: Joe van Tunen <joevt@shaw.ca>
---
 edid-decode.cpp | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

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);