[hackers] [scc] Fix logic() in lex.c The test was wrong because it was comparing with the result token instead of '=' character. || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 26 Aug 2015 22:32:48 +0200 (CEST)

commit 9fbe2c36662bf635d8e4d477ea75470a08a5c11f
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Aug 26 12:43:22 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Aug 26 12:43:22 2015 +0200

    Fix logic() in lex.c
    The test was wrong because it was comparing with the result token instead
    of '=' character.

diff --git a/cc1/lex.c b/cc1/lex.c
index 58ba415..1c61f0d 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
_AT_@ -444,7 +444,7 @@ logic(int op, int equal, int logic)
 {
         char c;
 
- if ((c = *input->p++) == equal)
+ if ((c = *input->p++) == '=')
                 return equal;
         if (c == op)
                 return logic;
Received on Wed Aug 26 2015 - 22:32:48 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 26 2015 - 22:36:16 CEST