This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
exec_file_hook_count data-type
- From: Daniel Lucq <daniel at lucq dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 22 Feb 2004 19:49:30 +0100 (CET)
- Subject: exec_file_hook_count data-type
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);