* exec_file_hook_count data-type
@ 2004-02-22 18:49 Daniel Lucq
2004-02-24 22:32 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Lucq @ 2004-02-22 18:49 UTC (permalink / raw)
To: gdb-patches
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
--- 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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: exec_file_hook_count data-type
2004-02-22 18:49 exec_file_hook_count data-type Daniel Lucq
@ 2004-02-24 22:32 ` Michael Snyder
2004-02-25 9:22 ` Daniel Lucq
0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2004-02-24 22:32 UTC (permalink / raw)
To: Daniel Lucq; +Cc: gdb-patches
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);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: exec_file_hook_count data-type
2004-02-24 22:32 ` Michael Snyder
@ 2004-02-25 9:22 ` Daniel Lucq
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Lucq @ 2004-02-25 9:22 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
On Tue, 24 Feb 2004, Michael Snyder wrote:
> 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. ;-)
OK, I concur whole-heartedly :-). Re-attached with "unsigned int" instead
of "int"...
Regards,
Daniel Lucq
--- 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 int 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 int i;
for (i = 0; i < exec_file_hook_count; i++)
(*exec_file_extra_hooks[i]) (filename);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-25 9:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-22 18:49 exec_file_hook_count data-type Daniel Lucq
2004-02-24 22:32 ` Michael Snyder
2004-02-25 9:22 ` Daniel Lucq
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox