From: Sami Kerola Date: Tue, 24 May 2011 20:56:32 +0000 (+0200) Subject: pg: use size_t for wcstombs() return code X-Git-Tag: v2.20-rc1~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f13616a064b957f926e8cb03952b6cdc220661a9;p=thirdparty%2Futil-linux.git pg: use size_t for wcstombs() return code Signed-off-by: Sami Kerola --- diff --git a/text-utils/pg.c b/text-utils/pg.c index 68275238f6..9fbbc0bbf0 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -395,7 +395,7 @@ checkf(void) static char * endline_for_mb(unsigned col, char *s) { - unsigned pos = 0; + size_t pos = 0; wchar_t *p = wbuf; wchar_t *end; size_t wl; @@ -462,7 +462,7 @@ endline_for_mb(unsigned col, char *s) ended: *end = L'\0'; p = wbuf; - if ((pos = wcstombs(NULL, p, READBUF)) == -1) + if ((pos = wcstombs(NULL, p, READBUF)) == (size_t) -1) return s + 1; return s + pos; }