From 9c99fa3d310f4652e1f30c9fe7bb69da868b4f46 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Dec 2000 00:48:48 +0000 Subject: Update. * dlfcn/dlerror.c (dlerror): Always create output string which includes object file name. --- dlfcn/dlerror.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dlfcn/dlerror.c') diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c index 929b5f4..6ce601d 100644 --- a/dlfcn/dlerror.c +++ b/dlfcn/dlerror.c @@ -69,10 +69,9 @@ dlerror (void) else { buf = (char *) result->errstring; - if (result->errcode != 0 - && __asprintf (&buf, "%s: %s: %s", - result->objname, _(result->errstring), - strerror (result->errcode)) != -1) + if (__asprintf (&buf, result->errcode != 0 ? "%s: %s: %s" : "%s: %s", + result->objname, _(result->errstring), + strerror (result->errcode)) != -1) { /* We don't need the error string anymore. */ if (strcmp (result->errstring, "out of memory") != 0) -- cgit v1.1