This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: exec_file_hook_count data-type
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);