Skip to content

Commit 2311e32

Browse files
committed
rxrpc: Be consistent about switch value in rxrpc_send_call_packet()
rxrpc_send_call_packet() should use type in both its switch-statements rather than using pkt->whdr.type. This might give the compiler an easier job of uninitialised variable checking. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 27d0fc4 commit 2311e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/rxrpc/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ int rxrpc_send_call_packet(struct rxrpc_call *call, u8 type)
182182
&msg, iov, ioc, len);
183183

184184
if (ret < 0 && call->state < RXRPC_CALL_COMPLETE) {
185-
switch (pkt->whdr.type) {
185+
switch (type) {
186186
case RXRPC_PACKET_TYPE_ACK:
187187
rxrpc_propose_ACK(call, pkt->ack.reason,
188188
ntohs(pkt->ack.maxSkew),

0 commit comments

Comments
 (0)