Quoting David Miller <da...@davemloft.net>:

From: "Robert P. J. Day" <rpj...@crashcourse.ca>
Date: Mon, 27 Aug 2018 04:55:29 -0400 (EDT)

  another pedantic oddity -- is there a reason for these two double
negations in net/core/net-sysfs.c?

It turns an arbitrary integer into a boolean, this is a common
construct across the kernel tree so I'm surprised you've never seen
it before.

Although, I don't know how much more hand holding we're willing to
tolerate continuing to give to you at this point.

Thanks.

  I mentioned in my earlier email that I know what that construct is
*typically* used for; I also pointed out that, AFAICT, it was totally
unnecessary in the context of the two routines I mentioned, which
would appear to ever return only one of two boolean values, 0 or 1.

  My experience with kernel code is that one should not introduce
unnecessary complexities, which suggests (as I stated) that there
seems to be no value in the "!!" construct *in those particular
cases*, hence my curiosity.

  If you want to criticize my question, at least have the courtesy
to represent it accurately.

rday

Reply via email to