Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
suggested patch for error flagged in static analysis
- X-seq: zsh-workers 32958
- From: Miles Ohlrich <miles.ohlrich@xxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: suggested patch for error flagged in static analysis
- Date: Mon, 4 Aug 2014 19:28:13 +0000
- Accept-language: en-US
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=isilon.com; s=jan2013;	t=1407180515; bh=lOgu0IOXxdHqr9ItCU/Wd+163pM=;	h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version;	b=Td+h6I1dt/mQelGRcI+27zi3WNHSl5Kj2vhevzEJaS1KpK2iiZrLH3n6jk9RF0nwT	 Vw72llYTtLffo+0xhMGcvIdcR7gTNG9wdILcj9FcdMXQWtLG3bjoXgsOOzO9gbljQ5	 i2oq21AJeGuqtx5+T/oniOn+yOXaPCwabIQsRWog=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Thread-index: Ac+wGjtoKaVfCG4bRNWABIkHQDJ9Xw==
- Thread-topic: suggested patch for error flagged in static analysis
I see this flagged as a "logical vs. bitwise operation" in my static analysis tool.
!CMF_FILE is always 0.  Should be ~CMF_FILE.
--- zsh-5.0.5/Src/Zle/compctl.c.orig    2014-08-04 12:20:54.327001219 -0700
+++ zsh-5.0.5/Src/Zle/compctl.c    2014-08-04 12:21:41.079945543 -0700
@@ -3389,11 +3389,11 @@ makecomplistflags(Compctl cc, char *s, i
         if (nonempty(l)) {
             /* And add the resulting words. */
             mflags |= CMF_FILE;
             for (n = firstnode(l); n; incnode(n))
             addmatch(getdata(n), NULL);
-            mflags &= !CMF_FILE;
+            mflags &= ~CMF_FILE;
         }
         opts[NULLGLOB] = ng;
         } else {
         char **dirs = 0, *ta[2];
Messages sorted by:
Reverse Date,
Date,
Thread,
Author