summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-06-11 20:01:26 +0000
committerGreg Hudson <ghudson@mit.edu>2010-06-11 20:01:26 +0000
commitc7a6ad31cd2bfe9c6ac93ae498c6d345ae1db1ba (patch)
tree58f107491303521ea0bfd23e54046c66261ee5af /src
parent6da632efb14f5a5187e3cda8434d29c2da9d1348 (diff)
downloadkrb5-c7a6ad31cd2bfe9c6ac93ae498c6d345ae1db1ba.tar.gz
krb5-c7a6ad31cd2bfe9c6ac93ae498c6d345ae1db1ba.tar.xz
krb5-c7a6ad31cd2bfe9c6ac93ae498c6d345ae1db1ba.zip
Remove the code for krb5_append_addresses(), which was never used and
was ifdef'd out fifteen years ago in r5464. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24133 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/copy_addrs.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/lib/krb5/krb/copy_addrs.c b/src/lib/krb5/krb/copy_addrs.c
index 7207c4c27..da55f992d 100644
--- a/src/lib/krb5/krb/copy_addrs.c
+++ b/src/lib/krb5/krb/copy_addrs.c
@@ -79,61 +79,3 @@ krb5_copy_addresses(krb5_context context, krb5_address *const *inaddr, krb5_addr
*outaddr = tempaddr;
return 0;
}
-
-#if 0
-/*
- * Append an address array, to another address array, with fresh allocation.
- * Note that this function may change the value of *outaddr even if it
- * returns failure, but it will not change the contents of the list.
- */
-krb5_error_code
-krb5_append_addresses(context, inaddr, outaddr)
- krb5_context context;
- krb5_address * const * inaddr;
- krb5_address ***outaddr;
-{
- krb5_error_code retval;
- krb5_address ** tempaddr;
- krb5_address ** tempaddr2;
- register unsigned int nelems = 0;
- register int norigelems = 0;
-
- if (!inaddr)
- return 0;
-
- tempaddr2 = *outaddr;
-
- while (inaddr[nelems]) nelems++;
- while (tempaddr2[norigelems]) norigelems++;
-
- tempaddr = (krb5_address **) realloc((char *)*outaddr,
- (nelems + norigelems + 1) * sizeof(*tempaddr));
- if (!tempaddr)
- return ENOMEM;
-
- /* The old storage has been freed. */
- *outaddr = tempaddr;
-
-
- for (nelems = 0; inaddr[nelems]; nelems++) {
- retval = krb5_copy_addr(context, inaddr[nelems],
- &tempaddr[norigelems + nelems]);
- if (retval)
- goto cleanup;
- }
-
- tempaddr[norigelems + nelems] = 0;
- return 0;
-
-cleanup:
- while (--nelems >= 0)
- krb5_free_address(context, tempaddr[norigelems + nelems]);
-
- /* Try to allocate a smaller amount of memory for *outaddr. */
- tempaddr = (krb5_address **) realloc((char *)tempaddr,
- (norigelems + 1) * sizeof(*tempaddr));
- if (tempaddr)
- *outaddr = tempaddr;
- return retval;
-}
-#endif