Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: Markus Deuling <deuling@de.ibm.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [Patch]: Little Cleanup
Date: Sat, 03 Mar 2007 09:08:00 -0000	[thread overview]
Message-ID: <45E93AE5.5050704@portugalmail.pt> (raw)
In-Reply-To: <45E7CC17.5040304@de.ibm.com>

Markus Deuling wrote:
> @@ -2909,8 +2902,7 @@
>  
>        if (!breakpoints_inserted && !ecs->another_trap)
>  	{
> -	  breakpoints_failed = insert_breakpoints ();
> -	  if (breakpoints_failed)
> +          if (insert_breakpoints ())
>  	    {
>  	      stop_stepping (ecs);
>  	      return;
>
>   

Actually, I find your version harder to read for someone not knowing the 
insert_breakpoints
API by heart.  To me, it looks like you are testing a function that 
returns a boolean.
I read it as: "if insert_breakpoints succeeded".  It looks like the de 
facto standard is to use:

if (insert_breakpoints () != 0)

The current version doesn't do it either, but 'breakpoints_failed'
gives a pretty good hint.
It may actually by a GNU coding convention, but I'm not sure.

(Just being picky on a Saturday morning, ignore at will.)

Cheers,
Pedro Alves



  reply	other threads:[~2007-03-03  9:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02  7:04 Markus Deuling
2007-03-03  9:08 ` Pedro Alves [this message]
2007-03-03 10:29   ` Eli Zaretskii
2007-03-05  5:59     ` Markus Deuling
2007-03-05 21:04       ` Eli Zaretskii
2007-03-05 21:23         ` Mark Kettenis
2007-03-05 21:23           ` Eli Zaretskii
2007-03-05 22:01             ` Jim Blandy
2007-03-06  4:22               ` Eli Zaretskii
2007-03-06 19:53                 ` Joel Brobecker
2007-03-06 20:40                   ` Michael Snyder
2007-03-06 21:03                   ` Eli Zaretskii
2007-03-06 22:10                     ` Ulrich Weigand
2007-03-07  7:36                       ` Markus Deuling
2007-03-07 12:15                         ` Daniel Jacobowitz
2007-03-07 16:34                         ` Eli Zaretskii
2007-03-09  4:48                           ` Markus Deuling
2007-03-09 16:21                             ` Ulrich Weigand

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=45E93AE5.5050704@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --cc=deuling@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /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