From 7f8ccf9e7cf2d0e4042cd5fa85bc49a2982e6807 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 19 Feb 2009 03:56:31 +0100 Subject: handle both positive and negative errno's --- src/pulsecore/core-error.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pulsecore/core-error.c') diff --git a/src/pulsecore/core-error.c b/src/pulsecore/core-error.c index 3d6c2c3b..d9caa946 100644 --- a/src/pulsecore/core-error.c +++ b/src/pulsecore/core-error.c @@ -47,6 +47,9 @@ const char* pa_cstrerror(int errnum) { char *translated, *t; char errbuf[128]; + if (errnum < 0) + errnum = -errnum; + if ((t = PA_STATIC_TLS_GET(cstrerror))) pa_xfree(t); -- cgit