Use MIN() macro from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
5d51917955
commit
725b38abd8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user