diff options
Diffstat (limited to 'libbacktrace/print.c')
-rw-r--r-- | libbacktrace/print.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libbacktrace/print.c b/libbacktrace/print.c index 2d9d76aeba7..9b775584d47 100644 --- a/libbacktrace/print.c +++ b/libbacktrace/print.c @@ -69,12 +69,10 @@ static void error_callback (void *data, const char *msg, int errnum) { struct print_data *pdata = (struct print_data *) data; - const char *name; - name = pdata->state->filename; - if (name == NULL) - name = "/proc/self/exe"; - fprintf (stderr, "%s: libbacktrace: %s", name, msg); + if (pdata->state->filename != NULL) + fprintf (stderr, "%s: ", pdata->state->filename); + fprintf (stderr, "libbacktrace: %s", msg); if (errnum > 0) fprintf (stderr, ": %s", strerror (errnum)); fputc ('\n', stderr); |