sh: Optimize setprompt(0).

Avoid doing work to print an empty prompt (such as when reading scripts).
This commit is contained in:
Jilles Tjoelker 2016-02-21 18:54:17 +00:00
parent 5036353a49
commit c39f3bac71
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295866

View File

@ -1930,6 +1930,8 @@ static void
setprompt(int which)
{
whichprompt = which;
if (which == 0)
return;
#ifndef NO_HISTORY
if (!el)