aboutsummaryrefslogtreecommitdiff
path: root/src/ui_ani.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2017-06-24 16:17:20 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-10-10 15:03:25 +0200
commit8c6ac2cd7b895b577d078b94263ff3a42839eeb6 (patch)
tree810c111ceb542ef60ac8c45f19f35085f409a10e /src/ui_ani.c
parentb8a2d1c361ae440f958675491655ca6831e266f1 (diff)
coverity fixes
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/ui_ani.c')
-rw-r--r--src/ui_ani.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui_ani.c b/src/ui_ani.c
index d1f1073..890ae83 100644
--- a/src/ui_ani.c
+++ b/src/ui_ani.c
@@ -1,3 +1,6 @@
+#include "config.h"
+
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -77,7 +80,8 @@ anic_cb(WINDOW *win, void *data, bool timed_out)
retval = UICB_ERR_BUF;
}
} else {
- asprintf(&tmp, "%c", b->state);
+ if (asprintf(&tmp, "%c", b->state) < 0)
+ retval = UICB_ERR_BUF;
}
if (win != NULL) {
mvwprintw(win, a->y, a->x, tmp);