Commit 28e8c191 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller

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: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9525d69a
...@@ -440,14 +440,8 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase, ...@@ -440,14 +440,8 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase,
#ifdef REORDER_DEBUG #ifdef REORDER_DEBUG
if (hc->chan[channel].disorder_flag) { if (hc->chan[channel].disorder_flag) {
struct sk_buff *skb; swap(hc->chan[channel].disorder_skb, nskb);
int cnt; swap(hc->chan[channel].disorder_cnt, rx_counter);
skb = hc->chan[channel].disorder_skb;
hc->chan[channel].disorder_skb = nskb;
nskb = skb;
cnt = hc->chan[channel].disorder_cnt;
hc->chan[channel].disorder_cnt = rx_counter;
rx_counter = cnt;
} }
hc->chan[channel].disorder_flag ^= 1; hc->chan[channel].disorder_flag ^= 1;
if (nskb) if (nskb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment