Date: Sun, 15 May 2011 22:09:28 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221975 - head/bin/sh Message-ID: <201105152209.p4FM9SmN054636@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun May 15 22:09:27 2011 New Revision: 221975 URL: http://svn.freebsd.org/changeset/base/221975 Log: sh: Minor optimization to output from ulimit/export/readonly. No functional change is intended. Modified: head/bin/sh/miscbltin.c head/bin/sh/var.c Modified: head/bin/sh/miscbltin.c ============================================================================== --- head/bin/sh/miscbltin.c Sun May 15 21:44:51 2011 (r221974) +++ head/bin/sh/miscbltin.c Sun May 15 22:09:27 2011 (r221975) @@ -465,7 +465,7 @@ ulimitcmd(int argc __unused, char **argv "(-%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 val = limit.rlim_max; if (val == RLIM_INFINITY) - out1fmt("unlimited\n"); + out1str("unlimited\n"); else { val /= l->factor; Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sun May 15 21:44:51 2011 (r221974) +++ head/bin/sh/var.c Sun May 15 22:09:27 2011 (r221975) @@ -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'); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105152209.p4FM9SmN054636>