summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-17 22:30:41 (GMT)
committerKristian Høgsberg <krh@bitplanet.net>2014-02-18 21:39:59 (GMT)
commitac188e9e44f5f852ec6163d269979f725ce73b57 (patch)
tree2570bf74a203ea487d1718775a6b11e34da1b9ea
parentf8b37449b25e4e63bc6f227bf12e8553f35ae0e9 (diff)
downloadwayland-ac188e9e44f5f852ec6163d269979f725ce73b57.tar.gz
wayland-ac188e9e44f5f852ec6163d269979f725ce73b57.tar.xz
wayland-client: Set a proper errno
errno is supposed to be positive, not negative. It seems that everything else that calls display_fatal_error() calls it with a positive error code, so do it here as well.
-rw-r--r--src/wayland-client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index 208bc9c..2dbb295 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -588,13 +588,13 @@ display_handle_error(void *data,
switch (code) {
case WL_DISPLAY_ERROR_INVALID_OBJECT:
case WL_DISPLAY_ERROR_INVALID_METHOD:
- err = -EINVAL;
+ err = EINVAL;
break;
case WL_DISPLAY_ERROR_NO_MEMORY:
- err = -ENOMEM;
+ err = ENOMEM;
break;
default:
- err = -EFAULT;
+ err = EFAULT;
break;
}