summaryrefslogtreecommitdiffstats
path: root/usr.bin/apply
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-08-21 12:54:15 +0000
committerbrian <brian@FreeBSD.org>2001-08-21 12:54:15 +0000
commitc5bd8f6e5d1166f9b34802a664d62671d140b351 (patch)
treeedc2ae44aa5c8db9ad8ca87cff563986cc4bcb35 /usr.bin/apply
parenta70c5b3073705bff9b76a2f75fe927958c3ae5e3 (diff)
downloadFreeBSD-src-c5bd8f6e5d1166f9b34802a664d62671d140b351.zip
FreeBSD-src-c5bd8f6e5d1166f9b34802a664d62671d140b351.tar.gz
Revert to version 1.16 which was more correct than either of my attempts.
Diffstat (limited to 'usr.bin/apply')
-rw-r--r--usr.bin/apply/apply.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c
index fc3d556..1fc4796 100644
--- a/usr.bin/apply/apply.c
+++ b/usr.bin/apply/apply.c
@@ -143,13 +143,13 @@ main(int argc, char *argv[]) {
p = cmd;
offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]);
- if (offset < 0 || offset >= cmdsize)
+ if ((size_t)offset >= cmdsize)
err(1, "snprintf() failed");
p += offset;
cmdsize -= offset;
for (i = 1; i <= nargs; i++) {
offset = snprintf(p, cmdsize, " %c%d", magic, i);
- if (offset < 0 || offset >= cmdsize)
+ if ((size_t)offset >= cmdsize)
err(1, "snprintf() failed");
p += offset;
cmdsize -= offset;
@@ -163,7 +163,7 @@ main(int argc, char *argv[]) {
nargs = 1;
} else {
offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]);
- if (offset < 0 || offset >= cmdsize)
+ if ((size_t)offset >= cmdsize)
err(1, "snprintf() failed");
nargs = n;
}
@@ -196,7 +196,7 @@ main(int argc, char *argv[]) {
if (p[0] == magic && isdigit(p[1]) && p[1] != '0') {
offset = snprintf(q, l, "%s",
argv[(++p)[0] - '0']);
- if (offset < 0 || offset >= l)
+ if ((size_t)offset >= l)
err(1, "snprintf() failed");
q += offset;
l -= offset;
OpenPOWER on IntegriCloud