This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH, reg-stack]: Add missing braces in memset size calculation


Hello!

2008-11-06 Uros Bizjak <ubizjak@gmail.com>

   * reg-stack.c (reg_to_stack): Add missing braces in memset
   size calculation.

Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline.

Uros.

Index: reg-stack.c
===================================================================
--- reg-stack.c    (revision 141649)
+++ reg-stack.c    (working copy)
@@ -3198,7 +3198,7 @@ reg_to_stack (void)
  max_uid = get_max_uid ();
  stack_regs_mentioned_data = VEC_alloc (char, heap, max_uid + 1);
  memset (VEC_address (char, stack_regs_mentioned_data),
-      0, sizeof (char) * max_uid + 1);
+      0, sizeof (char) * (max_uid + 1));

convert_regs ();



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