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
This commit is contained in:
Ruslan Ermilov 2003-03-15 13:34:48 +00:00
parent 869c12cbb4
commit bfd86a6070
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112265

View File

@ -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;
}
}