lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Dec 2014 12:02:06 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Vadim Kochan' <vadim4j@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [RFC iproute2] tc: Show classes in tree view

From: Vadim Kochan
> Added new '-t[ree]' which shows classes dependency
> in the tree view.
...
> @@ -278,6 +279,8 @@ int main(int argc, char **argv)
>  			++show_raw;
>  		} else if (matches(argv[1], "-pretty") == 0) {
>  			++show_pretty;
> +		} else if (matches(argv[1], "-tree") == 0) {
> +			++show_tree;
>  		} else if (matches(argv[1], "-Version") == 0) {
>  			printf("tc utility, iproute2-ss%s\n", SNAPSHOT);
>  			return 0;

Clearly you've followed the old code, but it is much clearer
to assign 1 (or true) rather than doing an increment
(unless you expect '-tree -tree' to do something extra).

I believe the whole business of using 'foo++' to change a 0 to a 1
harks back to the pdp11 where it was a shorter instruction sequence.

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ