This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: [PATCH/RFC] NULL terminate mips dis options


Hello!

On Mon, Feb 10, 2003 at 11:23:11AM -0800, Eric Christopher wrote:
> Unfortunately you didn't use ARRAY_SIZE as Chris had suggested. Could
> you please do that and send again?

Oops!

Regards,
Elias

opcodes/ChangeLog

2003-02-10  Elias Athanasopoulos  <elathan@phys.uoa.gr>

	* mips-dis.c (print_mips_disassembler_options): Make 'i' unsigned,
	use ARRAY_SIZE in loops.


===================================================================
RCS file: /home/anteater/bucvs/src/opcodes/mips-dis.c,v
retrieving revision 1.1
diff -bu -r1.1 /home/anteater/bucvs/src/opcodes/mips-dis.c
--- /home/anteater/bucvs/src/opcodes/mips-dis.c	2003/02/10 09:37:54	1.1
+++ /home/anteater/bucvs/src/opcodes/mips-dis.c	2003/02/10 20:30:31
@@ -1758,7 +1758,7 @@
 print_mips_disassembler_options (stream)
      FILE *stream;
 {
-  int i;
+  unsigned int i;
 
   fprintf (stream, _("\n\
 The following MIPS specific disassembler options are supported for use\n\
@@ -1793,14 +1793,14 @@
   fprintf (stream, _("\n\
   For the options above, the following values are supported for \"ABI\":\n\
    "));
-  for (i = 0; mips_abi_choices[i].name != NULL; i++)
+  for (i = 0; i < ARRAY_SIZE (mips_abi_choices); i++)
     fprintf (stream, " %s", mips_abi_choices[i].name);
   fprintf (stream, _("\n"));
 
   fprintf (stream, _("\n\
   For the options above, The following values are supported for \"ARCH\":\n\
    "));
-  for (i = 0; mips_arch_choices[i].name != NULL; i++)
+  for (i = 0; i < ARRAY_SIZE (mips_arch_choices); i++)
     if (*mips_arch_choices[i].name != '\0')
       fprintf (stream, " %s", mips_arch_choices[i].name);
   fprintf (stream, _("\n"));
	


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