Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52609c0b authored by David Chau's avatar David Chau Committed by David S. Miller
Browse files

[NET]: improve readability of dev_set_promiscuity() in net/core/dev.c



A trivial patch to improve the readability of dev_set_promiscuity()
in net/core/dev.c. New code does exactly the same thing as original
code.

Signed-off-by: default avatarDavid Chau <ddcc@mit.edu>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc971dee
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2089,10 +2089,11 @@ void dev_set_promiscuity(struct net_device *dev, int inc)
{
	unsigned short old_flags = dev->flags;

	dev->flags |= IFF_PROMISC;
	if ((dev->promiscuity += inc) == 0)
		dev->flags &= ~IFF_PROMISC;
	if (dev->flags ^ old_flags) {
	else
		dev->flags |= IFF_PROMISC;
	if (dev->flags != old_flags) {
		dev_mc_upload(dev);
		printk(KERN_INFO "device %s %s promiscuous mode\n",
		       dev->name, (dev->flags & IFF_PROMISC) ? "entered" :