]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/getdn.c
Insert missing ')'...
[openldap] / libraries / libldap / getdn.c
index 1142c883643f4e0959864d0dd516862f40bfae37..147215f02b6c452171c98595f44abb7a4842a76a 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1994 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -124,6 +124,7 @@ ldap_explode_dns( char *dn )
        int     ncomps, maxcomps;
        char    *s;
        char    **rdns;
+       char    *tok_r;
 
        if ( (rdns = (char **) malloc( 8 * sizeof(char *) )) == NULL ) {
                return( NULL );
@@ -131,7 +132,8 @@ ldap_explode_dns( char *dn )
 
        maxcomps = 8;
        ncomps = 0;
-       for ( s = strtok( dn, "@." ); s != NULL; s = strtok( NULL, "@." ) ) {
+       for ( s = ldap_int_strtok( dn, "@.", &tok_r ); s != NULL; 
+             s = ldap_int_strtok( NULL, "@.", &tok_r ) ) {
                if ( ncomps == maxcomps ) {
                        maxcomps *= 2;
                        if ( (rdns = (char **) realloc( rdns, maxcomps *