X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Foptions.c;h=ef19dfda61f273e2ea341c128f99b7863324a252;hb=c8e37af0ca8302c276e8c6af84eca4f926171261;hp=3e748a7848452c7830b625c047d147990a3ce508;hpb=8c772985c7b7300665a30932d71d45c8af24af21;p=openldap diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c index 3e748a7848..ef19dfda61 100644 --- a/libraries/libldap/options.c +++ b/libraries/libldap/options.c @@ -88,11 +88,6 @@ ldap_get_option( ldap_int_initialize(); } - if(outvalue == NULL) { - /* no place to get to */ - return LDAP_OPT_ERROR; - } - if(ld == NULL) { lo = &ldap_int_global_options; @@ -106,6 +101,11 @@ ldap_get_option( lo = &ld->ld_options; } + if(outvalue == NULL) { + /* no place to get to */ + return LDAP_OPT_ERROR; + } + switch(option) { case LDAP_OPT_API_INFO: { struct ldapapiinfo *info = (struct ldapapiinfo *) outvalue; @@ -152,7 +152,7 @@ ldap_get_option( break; } - * (int *) outvalue = ber_pvt_sb_get_desc( &(ld->ld_sb) ); + * (ber_socket_t *) outvalue = ber_pvt_sb_get_desc( &(ld->ld_sb) ); return LDAP_OPT_SUCCESS; case LDAP_OPT_DEREF: