Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Koning <pkoning@equallogic.com>
To: grante@visi.com
Cc: dje@transmeta.com, mark.newman@lmco.com, gdb@sources.redhat.com
Subject: Re: filtering of commands during async operation
Date: Wed, 05 Nov 2003 22:10:00 -0000	[thread overview]
Message-ID: <16297.30044.161916.721509@gargle.gargle.HOWL> (raw)
In-Reply-To: <20031105220245.GA4424@grante.dsl.visi.com>

>>>>> "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


  reply	other threads:[~2003-11-05 22:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05 21:11 Newman, Mark (N-Superior Technical Resource Inc)
2003-11-05 21:52 ` Doug Evans
2003-11-05 22:00   ` Grant Edwards
2003-11-05 22:10     ` Paul Koning [this message]
2003-11-05 23:11     ` Elena Zannoni
2003-11-06 14:32 Newman, Mark (N-Superior Technical Resource Inc)
2003-11-06 16:57 ` Elena Zannoni
     [not found] <1068129153.32379.ezmlm@sources.redhat.com>
2003-11-06 17:38 ` Jim Ingham
2003-11-06 19:41   ` Elena Zannoni
2003-11-06 21:16     ` Jim Ingham
2003-11-06 22:10       ` Andrew Cagney
2003-11-06 22:29         ` Elena Zannoni
2003-11-06 22:26       ` Elena Zannoni
2003-11-07 16:00 Newman, Mark (N-Superior Technical Resource Inc)
2003-11-07 16:14 ` Daniel Jacobowitz
2003-11-07 17:03 ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16297.30044.161916.721509@gargle.gargle.HOWL \
    --to=pkoning@equallogic.com \
    --cc=dje@transmeta.com \
    --cc=gdb@sources.redhat.com \
    --cc=grante@visi.com \
    --cc=mark.newman@lmco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox