Date: Sun, 11 Dec 2016 00:37:51 +0100 From: Oliver Pinter <oliver.pinter@hardenedbsd.org> To: Pietro Cerutti <gahr@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r307958 - stable/11/usr.bin/printenv Message-ID: <CAPQ4ffuO%2BSaZi=u7g=C-KMQJa%2Bd25AAt_PKU6FXUBPdo5D15Kg@mail.gmail.com> In-Reply-To: <201610260839.u9Q8dYSM029072@repo.freebsd.org> References: <201610260839.u9Q8dYSM029072@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/26/16, Pietro Cerutti <gahr@freebsd.org> wrote: > Author: gahr (ports committer) > Date: Wed Oct 26 08:39:33 2016 > New Revision: 307958 > URL: https://svnweb.freebsd.org/changeset/base/307958 > > Log: > MFC r307638: > > Chase a cornercase in printenv and sync its behaviour with builtin's > > The cornercase is when printenv is passed a parameter in the form > VAR=val, where VAR=val exists in the environment. In this case, printenv > would > print a spurious newline and returns 0. > > Approved by: cognet > MFC after: 1 week This MFC is only for 11 or for 10-STABLE too? > > Modified: > stable/11/usr.bin/printenv/printenv.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/usr.bin/printenv/printenv.c > ============================================================================== > --- stable/11/usr.bin/printenv/printenv.c Wed Oct 26 07:45:48 > 2016 (r307957) > +++ stable/11/usr.bin/printenv/printenv.c Wed Oct 26 08:39:33 > 2016 (r307958) > @@ -83,8 +83,8 @@ main(int argc, char *argv[]) > for (ep = environ; *ep; ep++) > if (!memcmp(*ep, *argv, len)) { > cp = *ep + len; > - if (!*cp || *cp == '=') { > - (void)printf("%s\n", *cp ? cp + 1 : cp); > + if (*cp == '=') { > + (void)printf("%s\n", cp + 1); > exit(0); > } > } > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to > "svn-src-stable-11-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffuO%2BSaZi=u7g=C-KMQJa%2Bd25AAt_PKU6FXUBPdo5D15Kg>