This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]