summaryrefslogtreecommitdiffstats
path: root/text-utils/pg.c
diff options
context:
space:
mode:
authorSami Kerola2011-05-24 22:56:32 +0200
committerKarel Zak2011-06-01 09:07:47 +0200
commitf13616a064b957f926e8cb03952b6cdc220661a9 (patch)
treea563f2c00a81ef36c7227741ac2bc6973de784dc /text-utils/pg.c
parentmount: use libmount to detect already mounted bind mounts (diff)
downloadkernel-qcow2-util-linux-f13616a064b957f926e8cb03952b6cdc220661a9.tar.gz
kernel-qcow2-util-linux-f13616a064b957f926e8cb03952b6cdc220661a9.tar.xz
kernel-qcow2-util-linux-f13616a064b957f926e8cb03952b6cdc220661a9.zip
pg: use size_t for wcstombs() return code
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/pg.c')
-rw-r--r--text-utils/pg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/text-utils/pg.c b/text-utils/pg.c
index 68275238f..9fbbc0bbf 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;
}