filtering of commands during async operation

Paul Koning pkoning@equallogic.com
Wed Nov 5 22:10:00 GMT 2003


>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:

 >> Good example of why it's useful to avoid using ! with strcmp.

 Grant> Why not just strcmp() ?

 Grant> if (strcmp() && strcmp() && strcmp())

Because strcmp isn't a boolean function.  Using boolean operations on
non-boolean values is a great way to produce bugs (as the example
showed).  It has a precise meaning in C, but that doesn't mean it
should be done.

       paul



More information about the Gdb mailing list