summaryrefslogtreecommitdiffstats
path: root/src/pulse/error.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-03-04 22:07:56 +0100
committerLennart Poettering <lennart@poettering.net>2009-03-04 22:07:56 +0100
commitdcee8888650583abd106f818ee56d5dff9028bba (patch)
tree0c37a0f0d2766b5a00a74bc0d3a0a6d5b03a189a /src/pulse/error.c
parent3dd8800e6d0ab1f11e981d368ec2bef38c88ce99 (diff)
parent656fc6660fac6ad4524fd2b679cbd35c69033d3b (diff)
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Diffstat (limited to 'src/pulse/error.c')
-rw-r--r--src/pulse/error.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pulse/error.c b/src/pulse/error.c
index d37084bb..9551d98e 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -6,7 +6,7 @@
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
@@ -68,7 +68,10 @@ const char*pa_strerror(int error) {
pa_init_i18n();
- if (error < 0 || error >= PA_ERR_MAX)
+ if (error < 0)
+ error = -error;
+
+ if (error >= PA_ERR_MAX)
return NULL;
return _(errortab[error]);