From 549ba0f80ae5ecc99d6862ca8e8b2b7f610b3608 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Wed, 25 Mar 2009 22:38:46 +0000 Subject: [PATCH] ARI fix: "xasprintf" rule. * printcmd.c (sym_info): Replace xasprintf by xstrprintf. --- gdb/ChangeLog | 5 +++++ gdb/printcmd.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 83685a750d3..ddb8e72bac2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-03-25 Pierre Muller + + ARI fix: "xasprintf" rule. + * printcmd.c (sym_info): Replace xasprintf by xstrprintf. + 2009-03-25 Pedro Alves * remote.c (remote_start_remote): In non-stop mode, call diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 750244e4c85..8403d5fcffe 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -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. */ -- 2.30.2