aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index e06eedd..f7fae35 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -629,15 +629,10 @@ void
print_sys_errmsg (const char *string, int errcode)
{
const char *err = safe_strerror (errcode);
- char *combined = (char *) alloca (strlen (err) + strlen (string) + 3);
- strcpy (combined, string);
- strcat (combined, ": ");
- strcat (combined, err);
-
/* We want anything which was printed on stdout to come out first, before
this message. */
gdb_flush (gdb_stdout);
- fprintf_unfiltered (gdb_stderr, "%s.\n", combined);
+ fprintf_unfiltered (gdb_stderr, "%s: %s.\n", string, err);
}
/* Control C eventually causes this to be called, at a convenient time. */