Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Daniel Lucq <daniel@lucq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: exec_file_hook_count data-type
Date: Tue, 24 Feb 2004 22:32:00 -0000	[thread overview]
Message-ID: <403BD111.3060909@redhat.com> (raw)
In-Reply-To: <Pine.BSO.4.58.0402221947400.5542@snorlax.internal.custodix.com>

Daniel Lucq wrote:
> Hi all,
> 
> I suppose exec_file_hook_count in corefile.c should always be >= 0, so why 
> not make it an unsigned instead of an int? (yeah, I suppose this is a 
> minor issue, but still :-)).
> 
> Regards,
> Daniel Lucq

Looks good.  I won't demand that you use "unsigned int", but I'd
like it.  I don't think it's covered by the coding standard, but
it seems to be the norm within gdb code (with exceptions), and in
my old age I find consistency comforting.  ;-)


> --- corefile.c.orig	Sun Feb 22 19:44:17 2004
> +++ corefile.c	Sun Feb 22 19:45:18 2004
> @@ -53,7 +53,7 @@
>  
>  hook_type exec_file_display_hook;	/* the original hook */
>  static hook_type *exec_file_extra_hooks;	/* array of additional hooks */
> -static int exec_file_hook_count = 0;	/* size of array */
> +static unsigned exec_file_hook_count = 0;	/* size of array */
>  
>  /* Binary file diddling handle for the core file.  */
>  
> @@ -86,7 +86,7 @@
>  static void
>  call_extra_exec_file_hooks (char *filename)
>  {
> -  int i;
> +  unsigned i;
>  
>    for (i = 0; i < exec_file_hook_count; i++)
>      (*exec_file_extra_hooks[i]) (filename);
> 



  reply	other threads:[~2004-02-24 22:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-22 18:49 Daniel Lucq
2004-02-24 22:32 ` Michael Snyder [this message]
2004-02-25  9:22   ` Daniel Lucq

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=403BD111.3060909@redhat.com \
    --to=msnyder@redhat.com \
    --cc=daniel@lucq.org \
    --cc=gdb-patches@sources.redhat.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