DragonFly BSD
DragonFly commits List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/bin/kill


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Nov 2004 22:31:33 -0800 (PST)

:
:"Chris Pressey" <cpressey@xxxxxxxxxxxxxxxxxxxxxxx> schreef:
:-	if (!strcmp(*argv, "-l")) {
:+	if (strcmp(*argv, "-l") == 0) {
:Is this really required by style(9)? I didn't know that, just wondering ;-)
:

    strcmp() is one of those calls which is far more confusing when '!'
    is used with it (a negation indicating success) then when the result
    is simply compared against 0 (a successful comparison indicating
    success).

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]