Fix -Wsign-compare warnings

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
This commit is contained in:
ngie 2017-05-28 03:47:58 +00:00
parent 1d0a3e69a2
commit ff72c48c4f

View File

@ -177,7 +177,7 @@ sdump_group(struct group *grp, char *buffer, size_t buflen)
written = snprintf(buffer, buflen, "%s:%s:%d:",
grp->gr_name, grp->gr_passwd, grp->gr_gid);
buffer += written;
if (written > buflen)
if (written > (int)buflen)
return;
buflen -= written;
@ -187,7 +187,7 @@ sdump_group(struct group *grp, char *buffer, size_t buflen)
written = snprintf(buffer, buflen, "%s%s",
cp == grp->gr_mem ? "" : ",", *cp);
buffer += written;
if (written > buflen)
if (written > (int)buflen)
return;
buflen -= written;