mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Use MIN macro from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
a1b422f4d6
commit
eff97b5e63
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298910
|
@ -182,7 +182,7 @@ cmdscanner(void)
|
|||
if ((bp = el_gets(el, &num)) == NULL || num == 0)
|
||||
quit(0, NULL);
|
||||
|
||||
len = (num > MAX_CMDLINE - 1) ? MAX_CMDLINE - 1 : num;
|
||||
len = MIN(MAX_CMDLINE - 1, num);
|
||||
memcpy(cmdline, bp, len);
|
||||
cmdline[len] = 0;
|
||||
history(hist, &he, H_ENTER, bp);
|
||||
|
|
Loading…
Reference in a new issue