From: Tom Rini Date: Thu, 22 Oct 2020 20:27:32 -0400 Subject: [PATCH] cli_hush.c: remove broken sanity check In-Reply-To: <20201007073603.29469-1-rasmus.villemoes@prevas.dk> References: <20201007073603.29469-1-rasmus.villemoes@prevas.dk> Message-ID: <20201023002732.GZ14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Oct 07, 2020 at 09:36:03AM +0200, Rasmus Villemoes wrote: > This code is intended do prevent one from setting a shell variable abc > by doing > > abc=123 > > if an environment variable named abc already exists. However, the > check is broken, since the env_get is done before the split on =, so > we look up whether an environment variable "abc=123" exists, which is > obviously never the case. > > One could move the code to below the split on =, but instead, just > remove it, saving a little .text: The check has never worked as > intended (it goes all the way back to the initial git commit), and it > would anyway not guard against one first setting the shell variable, > then doing 'env set abc xyz'. > > Signed-off-by: Rasmus Villemoes Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: