netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <shemming@brocade.com>
Cc: Vadim Kochan <vadim4j@gmail.com>, netdev@vger.kernel.org
Subject: [iproute PATCH 1/2] ss: Drop silly assignment
Date: Wed, 13 Apr 2016 22:07:04 +0200	[thread overview]
Message-ID: <1460578025-12224-2-git-send-email-phil@nwl.cc> (raw)
In-Reply-To: <1460578025-12224-1-git-send-email-phil@nwl.cc>

An expression of the form '(a | b) & b' will evaluate to the value of b
for any value of a or b.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 misc/ss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/ss.c b/misc/ss.c
index 38cf3312a746e..d6090018c5dbb 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -267,7 +267,7 @@ static void filter_default_dbs(struct filter *f)
 static void filter_states_set(struct filter *f, int states)
 {
 	if (states)
-		f->states = (f->states | states) & states;
+		f->states = states;
 }
 
 static void filter_merge_defaults(struct filter *f)
-- 
2.8.0

  reply	other threads:[~2016-04-13 20:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 19:32 ss filter problem Phil Sutter
2016-03-29 20:05 ` Vadim Kochan
2016-04-13 20:07 ` [iproute PATCH 0/2] Minor ss filter fix and review Phil Sutter
2016-04-13 20:07   ` Phil Sutter [this message]
2016-04-13 20:07   ` [iproute PATCH 2/2] ss: Fix accidental state filter override Phil Sutter
2016-04-19 14:57   ` [iproute PATCH 0/2] Minor ss filter fix and review Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460578025-12224-2-git-send-email-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=netdev@vger.kernel.org \
    --cc=shemming@brocade.com \
    --cc=vadim4j@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).