mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-02-20 01:40:52 -05:00
src: switch asserts to wl_abort
assert()s can be compiled away by #defining NDEBUG. Some build systems do this. Using wl_abort gives a human readable error message and it isn't compiled away. This commit closes issue #230. Signed-off-by: meltq <tejasvipin76@gmail.com>
This commit is contained in:
parent
fa1811ce3e
commit
0cecde304f
5 changed files with 36 additions and 16 deletions
|
|
@ -75,7 +75,8 @@ struct wl_connection {
|
|||
static inline size_t
|
||||
size_pot(uint32_t size_bits)
|
||||
{
|
||||
assert(size_bits < 8 * sizeof(size_t));
|
||||
if (!(size_bits < 8 * sizeof(size_t)))
|
||||
wl_abort("Too many bits for size_t\n");
|
||||
|
||||
return ((size_t)1) << size_bits;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue