diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-07-07 09:42:59 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-07-12 10:18:07 +1000 |
commit | d5d6d4cd53659aef2c1db925c9150626a1d90770 (patch) | |
tree | 388f316d800274ee6f09c4de862e908013703107 /test/litest-device-atmel-hover.c | |
parent | 26225f11df1713167e0bb835c840530706577964 (diff) |
Abort if zalloc ever fails
There's no guarantee that libinput does the right thing if memory allocation
fails and it's such a niche case on the systems we're targeting that it just
doesn't matter. Simply abort if zalloc ever fails.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/litest-device-atmel-hover.c')
-rw-r--r-- | test/litest-device-atmel-hover.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/litest-device-atmel-hover.c b/test/litest-device-atmel-hover.c index 942744e2..8b818da1 100644 --- a/test/litest-device-atmel-hover.c +++ b/test/litest-device-atmel-hover.c @@ -148,8 +148,9 @@ struct litest_test_device litest_atmel_hover_device = { static void atmel_hover_create(struct litest_device *d) { - struct litest_semi_mt *semi_mt = zalloc(sizeof(*semi_mt)); - assert(semi_mt); + struct litest_semi_mt *semi_mt; + + semi_mt = zalloc(sizeof(*semi_mt)); d->private = semi_mt; |