Use MIN() macro from sys/param.h.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-27 02:34:25 +00:00
parent 1e8b591f62
commit a9a46bd918
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298685

View File

@ -727,7 +727,7 @@ command(void)
if (vrbose) {
if ((bp = el_gets(el, &num)) == NULL || num == 0)
exit(0);
len = (num > MAXLINE) ? MAXLINE : num;
len = MIN(MAXLINE, num);
memcpy(line, bp, len);
line[len] = '\0';
history(hist, &he, H_ENTER, bp);