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>
(cherry picked from commit
cfd8e6c76c9be6c4ebdbc4e822762be4a30142e6)
static inline char *
builddir_lookup(void)
{
- char execdir[PATH_MAX] = {0};
+ char execdir[PATH_MAX];
char *pathsep;
ssize_t nread;
* the behavior of the other touches.)
*/
- if ((newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
- first->point.y < tp->thumb.lower_thumb_line) {
+ if (newest &&
+ (newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
+ first->point.y < tp->thumb.lower_thumb_line) {
tp_thumb_lift(tp);
return;
}
START_TEST(zalloc_overflow)
{
- zalloc(-1);
+ zalloc((size_t)-1);
}
END_TEST