]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/print.c
Cast away const.
[openldap] / libraries / libldap / print.c
index 0afe4db43c17864846875f187e2b2a9bb1ec1e01..f71f3689c99552f7dd1858c70f4f32b323aef844 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -26,7 +26,7 @@ static int ldap_log_check( LDAP *ld, int loglvl )
        if(ld == NULL) {
                errlvl = ldap_debug;
        } else {
-               errlvl = ld->ld_errno;
+               errlvl = ld->ld_debug;
        }
 
        return errlvl & loglvl ? 1 : 0;
@@ -43,15 +43,8 @@ int ldap_log_printf( LDAP *ld, int loglvl, const char *fmt, ... )
 
        va_start( ap, fmt );
 
-#ifdef HAVE_VSNPRINTF
        buf[sizeof(buf) - 1] = '\0';
        vsnprintf( buf, sizeof(buf)-1, fmt, ap );
-#elif HAVE_VSPRINTF
-       vsprintf( buf, fmt, ap ); /* hope it's not too long */
-#else
-       /* use doprnt() */
-       chokeme = "choke me! I don't have a doprnt manual handy!";
-#endif
 
        va_end(ap);