[BACK]Return to parse.yacc CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Diff for /src/usr.bin/sudo/Attic/parse.yacc between version 1.15 and 1.16

version 1.15, 2007/09/05 23:55:57 version 1.16, 2007/09/10 19:40:49
Line 54 
Line 54 
 # include <unistd.h>  # include <unistd.h>
 #endif /* HAVE_UNISTD_H */  #endif /* HAVE_UNISTD_H */
 #include <pwd.h>  #include <pwd.h>
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)  
 # include <malloc.h>  
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */  
 #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__)  #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
 # include <alloca.h>  # include <alloca.h>
 #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */  #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */
Line 198 
Line 195 
 static void expand_ga_list      __P((void));  static void expand_ga_list      __P((void));
 static void expand_match_list   __P((void));  static void expand_match_list   __P((void));
 static aliasinfo *find_alias    __P((char *, int));  static aliasinfo *find_alias    __P((char *, int));
 static int  more_aliases        __P((void));  static void more_aliases        __P((void));
        void init_parser         __P((void));         void init_parser         __P((void));
        void yyerror             __P((char *));         void yyerror             __P((char *));
   
Line 964 
Line 961 
     size_t onaliases;      size_t onaliases;
     char s[512];      char s[512];
   
     if (naliases >= nslots && !more_aliases()) {      if (naliases >= nslots)
         (void) snprintf(s, sizeof(s), "Out of memory defining alias `%s'",          more_aliases();
                         alias);  
         yyerror(s);  
         return(FALSE);  
     }  
   
     ai.type = type;      ai.type = type;
     ai.val = val;      ai.val = val;
Line 1013 
Line 1006 
 /*  /*
  * Allocates more space for the aliases list.   * Allocates more space for the aliases list.
  */   */
 static int  static void
 more_aliases()  more_aliases()
 {  {
   
     nslots += MOREALIASES;      nslots += MOREALIASES;
     if (nslots == MOREALIASES)      aliases = (aliasinfo *) erealloc3(aliases, nslots, sizeof(aliasinfo));
         aliases = (aliasinfo *) malloc(nslots * sizeof(aliasinfo));  
     else  
         aliases = (aliasinfo *) realloc(aliases, nslots * sizeof(aliasinfo));  
   
     return(aliases != NULL);  
 }  }
   
 /*  /*

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16