summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-08-21 11:24:53 +0000
committerbrian <brian@FreeBSD.org>2001-08-21 11:24:53 +0000
commit569bf91b79a1c9607f84cc3c6b51ee7fede1b215 (patch)
tree906d0564ca1c71aa4055b66604ae5a07793ad0a1 /usr.bin
parent4d0fae19b52489173cbb9c3afb3a755a177b510a (diff)
downloadFreeBSD-src-569bf91b79a1c9607f84cc3c6b51ee7fede1b215.zip
FreeBSD-src-569bf91b79a1c9607f84cc3c6b51ee7fede1b215.tar.gz
Remove unnecessary casts.
The original (1.16) code was mostly correct, but this version is far clearer. Casts suggested to now be obfuscations by: bde
Diffstat (limited to 'usr.bin')
-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 bf0b911..fc3d556 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 || (size_t)offset >= cmdsize)
+ if (offset < 0 || 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 || (size_t)offset >= cmdsize)
+ if (offset < 0 || 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 || (size_t)offset >= cmdsize)
+ if (offset < 0 || 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 || (size_t)offset >= l)
+ if (offset < 0 || offset >= l)
err(1, "snprintf() failed");
q += offset;
l -= offset;
OpenPOWER on IntegriCloud