diff --git a/usr.bin/Makefile b/usr.bin/Makefile index b4c24640b6d3..8aadb9f604ea 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -148,6 +148,7 @@ SUBDIR= alias \ soelim \ sort \ split \ + sponge \ stat \ stdbuf \ strings \ diff --git a/usr.bin/sponge/sponge.c b/usr.bin/sponge/sponge.c index fc3890208757..81bf864e10ca 100644 --- a/usr.bin/sponge/sponge.c +++ b/usr.bin/sponge/sponge.c @@ -172,7 +172,8 @@ main(int argc, char* argv[]) bufremain = bufcnt; while (bufremain > 0) { - whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; + whichbuf = bufremain < (unsigned long) maxiovec + ? bufremain : maxiovec; bufremain -= whichbuf; i = writev(fd, iov, whichbuf);