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

Diff for /src/usr.bin/tcfs/Attic/tcfs_dbmaint.c between version 1.9 and 1.10

version 1.9, 2000/06/20 07:09:45 version 1.10, 2000/06/20 07:33:51
Line 241 
Line 241 
         if (!pdb)          if (!pdb)
                 return (NULL);                  return (NULL);
   
         key = (char *)calloc(strlen(user) + 4 /* gid length */ + 1 /* null */,          key = (char *)malloc(strlen(user) + 6);
             sizeof(char));  
         if (!key)          if (!key)
                 return (NULL);                  return (NULL);
   
         sprintf(key, "%s\33%d\0", user, (int)gid);          sprintf(key, "%s\33%d", user, (int)gid);
         srchkey.data = key;          srchkey.data = key;
         srchkey.size = (int)strlen(key);          srchkey.size = (int)strlen(key);
   
Line 320 
Line 319 
                 return (0);                  return (0);
         }          }
   
         key = (char *)calloc(strlen(src->user) + 4 + 1, sizeof(char));          key = (char *)malloc(strlen(src->user) + 6);
         sprintf(key, "%s\33%d\0", src->user, src->gid);          sprintf(key, "%s\33%d", src->user, (int)src->gid);
   
         srchkey.data = key;          srchkey.data = key;
         srchkey.size = strlen(key);          srchkey.size = strlen(key);
Line 363 
Line 362 
   
                 tmp = (char *)calloc(1024, sizeof(char));                  tmp = (char *)calloc(1024, sizeof(char));
   
                 sprintf(tmp, "\33%d\0", gid);                  sprintf(tmp, "\33%d", gid);
                 if (strstr(dbkey.data, tmp)) {                  if (strstr(dbkey.data, tmp)) {
                         if (gdb->del(gdb, &dbkey, 0)) {                          if (gdb->del(gdb, &dbkey, 0)) {
                                 gdb->close(gdb);                                  gdb->close(gdb);

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10