]> granicus.if.org Git - procps-ng/commit
top: fine tune (ie. fix) 'other filter' negation logic
authorJim Warner <james.warner@comcast.net>
Wed, 6 Mar 2013 06:00:00 +0000 (00:00 -0600)
committerJaromir Capik <jcapik@redhat.com>
Thu, 7 Mar 2013 16:55:20 +0000 (17:55 +0100)
commit1a50f39971bbf9e4e4f0cab9461cea50569a213e
tree7eb505ef018c12b464b09a58c17800fd7f3194fe
parentef99eebbdb88e5e633c7b0f4b32ca399a3971ef3
top: fine tune (ie. fix) 'other filter' negation logic

Two too many of these '=' (cooks) spoiled top's broth.

There exists an unintentional variation on the classic
error: off-by-one. When a negation symbol is used with
top's new relational 'other filter' provision, one too
many 'matches' are excluded. This happened because top
covered only 2 of the 3 potential strcmp return codes.
When the strings were equal, they were simply dropped.

So this patch will uninvent that particular variation!

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Reference(s):
commit 2c2c5f5cd2f90c46c778fad6bc2e4105264cf668

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c