Skip to content

Commit 28e8c19

Browse files
GustavoARSilvadavem330
authored andcommitted
mISDN: l1oip_core: replace _manual_ swap with swap macro
Make use of the swap macro and remove unnecessary variables skb and cnt. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9525d69 commit 28e8c19

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/isdn/mISDN/l1oip_core.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,8 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase,
440440

441441
#ifdef REORDER_DEBUG
442442
if (hc->chan[channel].disorder_flag) {
443-
struct sk_buff *skb;
444-
int cnt;
445-
skb = hc->chan[channel].disorder_skb;
446-
hc->chan[channel].disorder_skb = nskb;
447-
nskb = skb;
448-
cnt = hc->chan[channel].disorder_cnt;
449-
hc->chan[channel].disorder_cnt = rx_counter;
450-
rx_counter = cnt;
443+
swap(hc->chan[channel].disorder_skb, nskb);
444+
swap(hc->chan[channel].disorder_cnt, rx_counter);
451445
}
452446
hc->chan[channel].disorder_flag ^= 1;
453447
if (nskb)

0 commit comments

Comments
 (0)