mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-01 23:48:00 +02:00
Fix a few coverity complaints
All minor: - execdir does not need initialization, it's not used until written to - 'newest' could be NULL - zalloc(-1) confuses coverity - 't' is never used in that test Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
34fe17f723
commit
cfd8e6c76c
4 changed files with 7 additions and 6 deletions
|
|
@ -35,7 +35,7 @@
|
||||||
static inline char *
|
static inline char *
|
||||||
builddir_lookup(void)
|
builddir_lookup(void)
|
||||||
{
|
{
|
||||||
char execdir[PATH_MAX] = {0};
|
char execdir[PATH_MAX];
|
||||||
char *pathsep;
|
char *pathsep;
|
||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -358,8 +358,9 @@ tp_thumb_update_multifinger(struct tp_dispatch *tp)
|
||||||
* the behavior of the other touches.)
|
* the behavior of the other touches.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
|
if (newest &&
|
||||||
first->point.y < tp->thumb.lower_thumb_line) {
|
(newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
|
||||||
|
first->point.y < tp->thumb.lower_thumb_line) {
|
||||||
tp_thumb_lift(tp);
|
tp_thumb_lift(tp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ END_TEST
|
||||||
|
|
||||||
START_TEST(zalloc_overflow)
|
START_TEST(zalloc_overflow)
|
||||||
{
|
{
|
||||||
zalloc(-1);
|
zalloc((size_t)-1);
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2874,8 +2874,8 @@ START_TEST(tool_type)
|
||||||
type == LIBINPUT_TABLET_TOOL_TYPE_PEN) {
|
type == LIBINPUT_TABLET_TOOL_TYPE_PEN) {
|
||||||
libinput_event_destroy(event);
|
libinput_event_destroy(event);
|
||||||
event = libinput_get_event(li);
|
event = libinput_get_event(li);
|
||||||
t = litest_is_tablet_event(event,
|
litest_is_tablet_event(event,
|
||||||
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||||
libinput_event_destroy(event);
|
libinput_event_destroy(event);
|
||||||
event = libinput_get_event(li);
|
event = libinput_get_event(li);
|
||||||
t = litest_is_tablet_event(event,
|
t = litest_is_tablet_event(event,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue