Skip to contentSkip to conversation

alfred: in recv_alfred_packet() add break at the end of the case block

PATCH Simon Wunderlich 1 participant 1 message Feb 19, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 17 lines · Antonio Quartulli

In recv_alfred_packet() a "break" statement is missing at the end of a case block and the function is returning -1 instead of 0 even if the packet type was known. Add a break to let the function behave correctly.

However this bug is harmless at the moment because the return value of the function is not checked anywhere.

Signed-off: Antonio Quartulli <[email protected]>

---
 recv.c | 1 +
 1 file changed, 1 insertion(+)
recv.c +0 -0
index 0170695..ffabba5 100644

recv.c int recv_alfred_packet(struct globals *globals) · line 419

Quoted 4 lines
recv.c +1 -0
@@ -416,6 +416,7 @@ int recv_alfred_packet(struct globals *globals)
 	case ALFRED_STATUS_TXEND:
 		process_alfred_status_txend(globals, &source.sin6_addr,
 					    (struct alfred_status_v0 *)packet);
+		break;

Applied (git rev 274133d)

Thanks,
Simon