This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Obvious ARI fix: remove xasprintf occurrences
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 25 Mar 2009 23:40:05 +0100
- Subject: [PATCH] Obvious ARI fix: remove xasprintf occurrences
This patch removes the two occurrences
of xasprintf revealed by AR Index page.
Checked in as obvious.
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog entry:
2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
ARI fix: "xasprintf" rule.
* printcmd.c (sym_info): Replace xasprintf by xstrprintf.
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.149
diff -u -p -r1.149 printcmd.c
--- printcmd.c 20 Mar 2009 23:04:33 -0000 1.149
+++ printcmd.c 25 Mar 2009 22:35:33 -0000
@@ -1036,9 +1036,9 @@ sym_info (char *arg, int from_tty)
/* Don't print the offset if it is zero.
We assume there's no need to handle i18n of "sym + offset". */
if (offset)
- xasprintf (&loc_string, "%s + %u", msym_name, offset);
+ loc_string = xstrprintf ("%s + %u", msym_name, offset);
else
- xasprintf (&loc_string, "%s", msym_name);
+ loc_string = xstrprintf ("%s", msym_name);
/* Use a cleanup to free loc_string in case the user quits
a pagination request inside printf_filtered. */