diff options
author | danborkmann@iogearbox.net <danborkmann@iogearbox.net> | 2012-08-20 05:34:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-23 07:58:27 +0200 |
commit | 9e67030af367ab524d0856af9e992de241eca3c7 (patch) | |
tree | 751ac8ad2e353622e966ad85f554ae5ba9e7d086 /net/packet/af_packet.c | |
parent | rds: Don't disable BH on BH context (diff) | |
download | linux-9e67030af367ab524d0856af9e992de241eca3c7.tar.xz linux-9e67030af367ab524d0856af9e992de241eca3c7.zip |
af_packet: use define instead of constant
Instead of using a hard-coded value for the status variable, it would make
the code more readable to use its destined define from linux/if_packet.h.
Signed-off-by: daniel.borkmann@tik.ee.ethz.ch
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r-- | net/packet/af_packet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index fe0912f161ce..bfaa0a83f0eb 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -855,7 +855,8 @@ static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, ppd->hv1.tp_vlan_tci = vlan_tx_tag_get(pkc->skb); ppd->tp_status = TP_STATUS_VLAN_VALID; } else { - ppd->hv1.tp_vlan_tci = ppd->tp_status = 0; + ppd->hv1.tp_vlan_tci = 0; + ppd->tp_status = TP_STATUS_AVAILABLE; } } @@ -1951,7 +1952,7 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg) int tp_len, size_max; unsigned char *addr; int len_sum = 0; - int status = 0; + int status = TP_STATUS_AVAILABLE; int hlen, tlen; mutex_lock(&po->pg_vec_lock); |