This is the mail archive of the gdb-patches@sourceware.org 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]

[RFA] ARI fix: Remove asprintf in breakpoint.c


  Trying to reduce the number of critical
errors in 
http://sourceware.org/gdb/current/ari/

  Is this one OK to commit?


Pierre Muller


ChangeLog entry:

2007-10-08  Pierre Muller  <muller@ics.u-strasbg.fr>

        * breakpoint.c (print_one_breakpoint_location): ARI fix:
        Replace asprintf by xstrprintf.



Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.271
diff -u -p -r1.271 breakpoint.c
--- breakpoint.c        1 Oct 2007 00:17:57 -0000       1.271
+++ breakpoint.c        8 Oct 2007 12:11:31 -0000
@@ -3526,7 +3526,7 @@ print_one_breakpoint_location (struct br
   if (part_of_multiple)
     {
       char *formatted;
-      asprintf (&formatted, "%d.%d", b->number, loc_number);
+      formatted = xstrprintf ("%d.%d", b->number, loc_number);
       ui_out_field_string (uiout, "number", formatted);
       xfree (formatted);
     }




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