[BACK]Return to lookup.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rdist

Diff for /src/usr.bin/rdist/lookup.c between version 1.5 and 1.6

version 1.5, 1996/07/11 11:57:09 version 1.6, 1996/07/12 07:23:59
Line 138 
Line 138 
   
         debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value);          debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value);
   
         if (strlen(name) > sizeof(ebuf)-12)  
                 yyerror("name is too long");  
         n = 0;          n = 0;
         for (cp = name; *cp; )          for (cp = name; *cp; )
                 n += *cp++;                  n += *cp++;
Line 150 
Line 148 
                         continue;                          continue;
                 if (action != LOOKUP) {                  if (action != LOOKUP) {
                         if (action != INSERT || s->s_type != CONST) {                          if (action != INSERT || s->s_type != CONST) {
                                 (void) sprintf(ebuf, "%s redefined", name);                                  (void) snprintf(ebuf, sizeof(ebuf), "%s redefined", name);
                                 yyerror(ebuf);                                  yyerror(ebuf);
                         }                          }
                 }                  }
Line 158 
Line 156 
         }          }
   
         if (action == LOOKUP) {          if (action == LOOKUP) {
                 (void) sprintf(ebuf, "%s undefined", name);                  (void) snprintf(ebuf, sizeof(ebuf), "%s undefined", name);
                 yyerror(ebuf);                  yyerror(ebuf);
                 return(NULL);                  return(NULL);
         }          }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6