1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

Use MIN()/MAX() macros from sys/param.h.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-21 06:24:13 +00:00
parent 67210fb3b8
commit f4b72a8dd2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298394
2 changed files with 3 additions and 3 deletions

View File

@ -690,7 +690,7 @@ genliteraldir(char *name, ino_t ino)
rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
dp = dup(dirp->dd_fd);
for (i = itp->t_size; i > 0; i -= BUFSIZ) {
size = i < BUFSIZ ? i : BUFSIZ;
size = MIN(i, BUFSIZ);
if (read(dp, buf, (int) size) == -1) {
fprintf(stderr,
"write error extracting inode %ju, name %s\n",

View File

@ -132,7 +132,7 @@ setinput(char *source, int ispipecommand)
if (bflag)
newtapebuf(ntrec);
else
newtapebuf(NTREC > HIGHDENSITYTREC ? NTREC : HIGHDENSITYTREC);
newtapebuf(MAX(NTREC, HIGHDENSITYTREC));
terminal = stdin;
if (ispipecommand)
@ -1010,7 +1010,7 @@ getfile(void (*datafill)(char *, long), void (*attrfill)(char *, long),
* block of the hole in the file. Postpone the
* seek until next file write.
*/
seekpos += (long)(size > TP_BSIZE ? TP_BSIZE : size);
seekpos += (long)MIN(TP_BSIZE, size);
}
if ((size -= TP_BSIZE) <= 0) {
if (size > -TP_BSIZE && curblk > 0) {