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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux