handle both positive and negative errno's

This commit is contained in:
Lennart Poettering 2009-02-19 03:56:31 +01:00
parent 6db307360b
commit 7f8ccf9e7c

View file

@ -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);