mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
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.
This commit is contained in:
parent
f8b37449b2
commit
ac188e9e44
1 changed files with 3 additions and 3 deletions
|
|
@ -588,13 +588,13 @@ display_handle_error(void *data,
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case WL_DISPLAY_ERROR_INVALID_OBJECT:
|
case WL_DISPLAY_ERROR_INVALID_OBJECT:
|
||||||
case WL_DISPLAY_ERROR_INVALID_METHOD:
|
case WL_DISPLAY_ERROR_INVALID_METHOD:
|
||||||
err = -EINVAL;
|
err = EINVAL;
|
||||||
break;
|
break;
|
||||||
case WL_DISPLAY_ERROR_NO_MEMORY:
|
case WL_DISPLAY_ERROR_NO_MEMORY:
|
||||||
err = -ENOMEM;
|
err = ENOMEM;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
err = -EFAULT;
|
err = EFAULT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue