sh: Minor optimization to output from ulimit/export/readonly.
No functional change is intended.
This commit is contained in:
parent
463a7e27bf
commit
258ef734e7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221975
@ -465,7 +465,7 @@ ulimitcmd(int argc __unused, char **argv __unused)
|
||||
"(-%c) ", l->option);
|
||||
out1fmt("%-18s %18s ", l->name, optbuf);
|
||||
if (val == RLIM_INFINITY)
|
||||
out1fmt("unlimited\n");
|
||||
out1str("unlimited\n");
|
||||
else
|
||||
{
|
||||
val /= l->factor;
|
||||
@ -491,7 +491,7 @@ ulimitcmd(int argc __unused, char **argv __unused)
|
||||
val = limit.rlim_max;
|
||||
|
||||
if (val == RLIM_INFINITY)
|
||||
out1fmt("unlimited\n");
|
||||
out1str("unlimited\n");
|
||||
else
|
||||
{
|
||||
val /= l->factor;
|
||||
|
11
bin/sh/var.c
11
bin/sh/var.c
@ -681,14 +681,13 @@ exportcmd(int argc, char **argv)
|
||||
out1str(cmdname);
|
||||
out1c(' ');
|
||||
}
|
||||
p = strchr(vp->text, '=');
|
||||
if (values && !(vp->flags & VUNSET)) {
|
||||
p++;
|
||||
outbin(vp->text, p - vp->text,
|
||||
out1);
|
||||
out1qstr(p);
|
||||
outbin(vp->text,
|
||||
vp->name_len + 1, out1);
|
||||
out1qstr(vp->text +
|
||||
vp->name_len + 1);
|
||||
} else
|
||||
outbin(vp->text, p - vp->text,
|
||||
outbin(vp->text, vp->name_len,
|
||||
out1);
|
||||
out1c('\n');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user