Skip to contentSkip to conversation

Dead code in drivers/isdn/avm/avmcard.h

PATCH In review Eric Sesterhenn 2 participants 3 messages Mar 7, 2006 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Dead code in drivers/isdn/avm/avmcard.h

hi,

this fixes coverity id #2. the if (i==0) is pretty useless, since we assing i=0, just the line before.
Just compile tested.

drivers/isdn/hardware/avm/avmcard.h renamed from drivers/isdn/hardware/avm/avmcard.h.orig +1 -2
@@ -437,8 +437,7 @@ static inline unsigned int t1_get_slice(
 #endif
 					dp += i;
 					i = 0;
-					if (i == 0)
-						break;
+					break;
 					/* fall through */
 				default:
 					*dp++ = b1_get_byte(base);
#2 lore raw
In reply to a message not in the archive
Quoted 8 lines · Thorsten Kranzkowski
Quoted 5 lines · Eric Sesterhenn

hi,

this fixes coverity id #2. the if (i==0) is pretty useless, since we assing i=0, just the line before.
Just compile tested.

Iff this is the right fix the comment should be removed as well, no?

updated patch below.

Signed-off-by Eric Sesterhenn
drivers/isdn/hardware/avm/avmcard.h renamed from drivers/isdn/hardware/avm/avmcard.h.orig +1 -3
@@ -437,9 +437,7 @@ static inline unsigned int t1_get_slice(
 #endif
 					dp += i;
 					i = 0;
-					if (i == 0)
-						break;
-					/* fall through */
+					break;
 				default:
 					*dp++ = b1_get_byte(base);
 					i--;
#3 lore raw
In reply to Eric Sesterhenn

drivers/isdn/hardware/avm/avmcard.h static inline unsigned int t1_get_slice( · line 442

Quoted 6 lines
drivers/isdn/hardware/avm/avmcard.h renamed from drivers/isdn/hardware/avm/avmcard.h.orig +1 -2
 					i = 0;
-					if (i == 0)
-						break;
+					break;
 					/* fall through */
 				default:

This leaves the "fall through" comment as bogus, remove that too.

Olaf