[PATCH 01/13] pg: use size_t for wcstombs() return code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 text-utils/pg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/text-utils/pg.c b/text-utils/pg.c
index 6827523..9fbbc0b 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;
 }
-- 
1.7.5.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux