From 216aa966d5fd1fcaf4e15eba025910b7282c29a6 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 31 Jan 2017 11:48:05 +0100 Subject: call: Fix error check on iconv's return value. Signed-off-by: Ralf Baechle --- call/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'call') diff --git a/call/call.c b/call/call.c index 022f6a3..790318e 100644 --- a/call/call.c +++ b/call/call.c @@ -189,7 +189,7 @@ static int widthchar(char *s, size_t bytes, int xpos) /* * Note: Actually need to check if bad UTF8 characters show as ? */ - if (iconv(utf8towchart, &s, &bytes, &outbuf, &outsize)< 0) + if (iconv(utf8towchart, &s, &bytes, &outbuf, &outsize) == (size_t) -1) return 0; if (c == 9) { return 8 - (xpos & 7); -- cgit v1.2.3