From 2beb93014061a70a5e027b8c7cf71431135f6eb3 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Tue, 30 Apr 1991 11:34:47 +0000 Subject: [PATCH] use strdup() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2065 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/rc_dfl.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c index c7e895ace..c99a12368 100644 --- a/src/lib/krb5/rcache/rc_dfl.c +++ b/src/lib/krb5/rcache/rc_dfl.c @@ -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; -- 2.26.2