]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/getdxbyname.c
Add ber_bvstr and ber_bvstrdup string to berval allocators.
[openldap] / libraries / libldap / getdxbyname.c
index 221bd409fb9470d887f81f4430bae65fcfca3b48..602721a05ed11124989aefae3565904aeac102c6 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@@ -14,7 +15,7 @@
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <ac/stdlib.h>
 
 #include <ac/ctype.h>
 #include <ac/socket.h>
@@ -23,7 +24,7 @@
 
 #include "ldap-int.h"
 
-static char ** decode_answer LDAP_P(( unsigned char *answer, int len ));
+static char ** decode_answer LDAP_P(( unsigned char *answer, ber_len_t len ));
 
 #define MAX_TO_SORT    32
 
@@ -33,7 +34,7 @@ static char ** decode_answer LDAP_P(( unsigned char *answer, int len ));
  *     array.
  */
 char **
-ldap_getdxbyname( char *domain )
+ldap_getdxbyname( const char *domain )
 {
     unsigned char      buf[ PACKETSZ ];
     char               **dxs;
@@ -64,7 +65,7 @@ ldap_getdxbyname( char *domain )
 
 
 static char **
-decode_answer( unsigned char *answer, int len )
+decode_answer( unsigned char *answer, ber_len_t len )
 {
     HEADER             *hp;
     char               buf[ 256 ], **dxs;
@@ -123,7 +124,7 @@ decode_answer( unsigned char *answer, int len )
        rr_len = _getshort( p );
        p += INT16SZ;
        if ( class == C_IN && type == T_TXT ) {
-           int         i, n, pref, txt_len;
+           int         pref, txt_len;
            char        *q, *r;
 
            q = (char *)p;