zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Possible copy paste error?
@ 2023-02-28 13:37 Mikael Magnusson
  2023-02-28 13:49 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2023-02-28 13:37 UTC (permalink / raw)
  To: zsh-workers

Coverity noticed that this first branch of the if statement has "meta"
added to all the variable names except this zlecs at the end, should it?
(I'm asking the same question)
---
 Src/Zle/zle_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index fa0868245a..5046ee8784 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -799,7 +799,7 @@ spaceinline(int ct)
 		if (rhp->start_meta - sub >= zlemetacs) {
 		    rhp->start_meta += ct;
 		}
-		if (rhp->end_meta - sub >= zlemetacs && (!predisplaylen || zlecs)) {
+		if (rhp->end_meta - sub >= zlemetacs && (!predisplaylen || zlemetacs)) {
 		    rhp->end_meta += ct;
 		}
 	    }
-- 
2.38.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: Possible copy paste error?
  2023-02-28 13:37 PATCH: Possible copy paste error? Mikael Magnusson
@ 2023-02-28 13:49 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2023-02-28 13:49 UTC (permalink / raw)
  To: zsh-workers

> On 28/02/2023 13:37 Mikael Magnusson <mikachu@gmail.com> wrote:
> Coverity noticed that this first branch of the if statement has "meta"
> added to all the variable names except this zlecs at the end, should it?
> (I'm asking the same question)

It should be all or nothing, yes.  Either the metafied version is valid
or it isn't and if it is the non-metafied version isn't currently useful.
(You might get away with it depending on what changed since conversion.)

pws


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-28 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 13:37 PATCH: Possible copy paste error? Mikael Magnusson
2023-02-28 13:49 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).