use strdup()
authorJohn Kohl <jtkohl@mit.edu>
Tue, 30 Apr 1991 11:34:47 +0000 (11:34 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Tue, 30 Apr 1991 11:34:47 +0000 (11:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2065 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/rcache/rc_dfl.c

index c7e895ace66920092b2fc282ce7b91a4770709b4..c99a123681db35f5a052bb4e089c3ecc2a41cad7 100644 (file)
@@ -128,19 +128,6 @@ struct authlist
  }
 ;
 
-/* XXX should we use strdup? */
-static char *
-strsave(s)
-register const char *s;
-{
-    register char *ret;
-    
-    if (ret = malloc(strlen(s)+1)) {
-       (void) strcpy(ret, s);
-       return ret;
-    }
-    return 0;
-}
 /* of course, list is backwards from file */
 /* hash could be forwards since we have to search on match, but naaaah */
 
@@ -171,11 +158,11 @@ krb5_donot_replay *rep;
  ta->na = t->a; t->a = ta;
  ta->nh = t->h[rephash]; t->h[rephash] = ta;
  ta->rep = *rep;
- if (!(ta->rep.client = strsave(rep->client))) {
+ if (!(ta->rep.client = strdup(rep->client))) {
      FREE(ta);
      return CMP_MALLOC;
  }
- if (!(ta->rep.server = strsave(rep->server))) {
+ if (!(ta->rep.server = strdup(rep->server))) {
      FREE(ta->rep.client);
      FREE(ta);
      return CMP_MALLOC;