[hackers] [scc] [cc1] Fix limits checking in functions declaration || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 8 Mar 2017 13:02:45 +0100 (CET)

commit 59165d9e6a8a1c8aa7b65d0b50976cd71cd7c788
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Tue Mar 7 12:03:25 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Wed Mar 8 11:22:58 2017 +0100

    [cc1] Fix limits checking in functions declaration

diff --git a/cc1/decl.c b/cc1/decl.c
index 07fd5d6..0066589 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -351,7 +351,7 @@ static Symbol *dodcl(int rep,
                      Type *type);
 
 static int
-krargs(Symbol *pars[], unsigned *nparsp)
+krpars(Symbol *pars[], unsigned *nparsp)
 {
         Symbol *sym;
         int toomany = 0;
_AT_@ -367,7 +367,7 @@ krargs(Symbol *pars[], unsigned *nparsp)
                                yylval.sym->name);
                         continue;
                 }
- if (npars < NR_FUNARG) {
+ if (npars < NR_FUNPARAM) {
                         ++npars;
                         *pars++ = sym;
                         continue;
_AT_@ -388,7 +388,7 @@ krfun(struct declarators *dp,
 
 
         if (yytoken != ')')
- toomany = krargs(pars, nparsp);
+ toomany = krpars(pars, nparsp);
         else
                 *nparsp = 0;
 
_AT_@ -434,7 +434,7 @@ ansifun(struct declarators *dp,
                 }
 
                 if (sym) {
- if (npars == NR_FUNARG) {
+ if (npars == NR_FUNPARAM) {
                                 toomany = 1;
                         } else {
                                 npars++;
Received on Wed Mar 08 2017 - 13:02:45 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 08 2017 - 13:12:20 CET