mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
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:
parent
5660ea414f
commit
c7bada036d
5 changed files with 30 additions and 24 deletions
|
|
@ -385,3 +385,15 @@ wl_log(const char *fmt, ...)
|
|||
wl_log_handler(fmt, argp);
|
||||
va_end(argp);
|
||||
}
|
||||
|
||||
void
|
||||
wl_abort(const char *fmt, ...)
|
||||
{
|
||||
va_list argp;
|
||||
|
||||
va_start(argp, fmt);
|
||||
wl_log_handler(fmt, argp);
|
||||
va_end(argp);
|
||||
|
||||
abort();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue