summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-error.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-19 03:56:31 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-19 03:56:31 +0100
commit7f8ccf9e7cf2d0e4042cd5fa85bc49a2982e6807 (patch)
tree188bc5cec2df5807eeb81a0c6cbd64562b93beea /src/pulsecore/core-error.c
parent6db307360b7ef95211aff13548206464e8909882 (diff)
handle both positive and negative errno's
Diffstat (limited to 'src/pulsecore/core-error.c')
-rw-r--r--src/pulsecore/core-error.c3
1 files changed, 3 insertions, 0 deletions
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);