summaryrefslogtreecommitdiffstats
path: root/bin/dd
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-03-15 13:34:48 +0000
committerru <ru@FreeBSD.org>2003-03-15 13:34:48 +0000
commite6fb7d946102aa175d85a95db21974f85b243dab (patch)
tree9d04135427aea0eaee6550bb88f6fb113029447a /bin/dd
parentc9911d1f17e4530d652da4199abb7622ff433044 (diff)
downloadFreeBSD-src-e6fb7d946102aa175d85a95db21974f85b243dab.zip
FreeBSD-src-e6fb7d946102aa175d85a95db21974f85b243dab.tar.gz
ssize_t is not required to be the same width as size_t by the
specs, so cast to intmax_t where appropriate. Pointed out by: bde
Diffstat (limited to 'bin/dd')
-rw-r--r--bin/dd/args.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/dd/args.c b/bin/dd/args.c
index 7e66b7f..b629b3a 100644
--- a/bin/dd/args.c
+++ b/bin/dd/args.c
@@ -189,7 +189,7 @@ f_bs(char *arg)
res = get_num(arg);
if (res < 1 || res > SSIZE_MAX)
- errx(1, "bs must be between 1 and %zd", SSIZE_MAX);
+ errx(1, "bs must be between 1 and %jd", (intmax_t)SSIZE_MAX);
in.dbsz = out.dbsz = (size_t)res;
}
@@ -200,7 +200,7 @@ f_cbs(char *arg)
res = get_num(arg);
if (res < 1 || res > SSIZE_MAX)
- errx(1, "cbs must be between 1 and %zd", SSIZE_MAX);
+ errx(1, "cbs must be between 1 and %jd", (intmax_t)SSIZE_MAX);
cbsz = (size_t)res;
}
@@ -235,7 +235,8 @@ f_ibs(char *arg)
if (!(ddflags & C_BS)) {
res = get_num(arg);
if (res < 1 || res > SSIZE_MAX)
- errx(1, "ibs must be between 1 and %zd", SSIZE_MAX);
+ errx(1, "ibs must be between 1 and %jd",
+ (intmax_t)SSIZE_MAX);
in.dbsz = (size_t)res;
}
}
@@ -255,7 +256,8 @@ f_obs(char *arg)
if (!(ddflags & C_BS)) {
res = get_num(arg);
if (res < 1 || res > SSIZE_MAX)
- errx(1, "obs must be between 1 and %zd", SSIZE_MAX);
+ errx(1, "obs must be between 1 and %jd",
+ (intmax_t)SSIZE_MAX);
out.dbsz = (size_t)res;
}
}
OpenPOWER on IntegriCloud