add wl_abort private function

On many places in the code we use wl_log + abort or wl_log + assert(0).
Replace these with one call to wl_abort, so that we don't mix abort(),
assert(0) and we'll save few lines

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Marek Chalupa 2015-11-16 11:49:02 +01:00 committed by Bryce Harrington
parent 5660ea414f
commit c7bada036d
5 changed files with 30 additions and 24 deletions

View file

@ -597,18 +597,14 @@ wl_proxy_marshal_array_constructor(struct wl_proxy *proxy,
}
closure = wl_closure_marshal(&proxy->object, opcode, args, message);
if (closure == NULL) {
wl_log("Error marshalling request: %m\n");
abort();
}
if (closure == NULL)
wl_abort("Error marshalling request: %s\n", strerror(errno));
if (debug_client)
wl_closure_print(closure, &proxy->object, true);
if (wl_closure_send(closure, proxy->display->connection)) {
wl_log("Error sending request: %m\n");
abort();
}
if (wl_closure_send(closure, proxy->display->connection))
wl_abort("Error sending request: %s\n", strerror(errno));
wl_closure_destroy(closure);