#include "lber-int.h"
-typedef void (*BER_LOG_FN) LDAP_P((FILE *file, char *subsys, int level, const char *fmt, va_list vl));
-
-#define ber_log_check(errlvl, loglvl) (errlvl & loglvl)
+#define ber_log_check(errlvl, loglvl) ((errlvl) & (loglvl))
BER_LOG_FN ber_int_log_proc = NULL;
* lber log
*/
-int ber_pvt_log_output( char *subsystem, int level, const char *fmt, ... )
+int ber_pvt_log_output(
+ const char *subsystem,
+ int level,
+ const char *fmt,
+ ... )
{
char buf[ 1024 ];
va_list vl;
(long) ber->ber_end,
(long) len );
- ber_pvt_log_output( subsys, level, "%s", buf );
+ (void) ber_pvt_log_output( subsys, level, "%s", buf );
#define BP_OFFSET 9
#define BP_GRAPH 60
unsigned off;
if( !n ) {
- if( i ) ber_pvt_log_output( subsys, level, "%s", line );
+ if( i ) {
+ (void) ber_pvt_log_output( subsys, level, "%s", line );
+ }
memset( line, ' ', sizeof(line)-2 );
line[sizeof(line)-2] = '\n';
line[sizeof(line)-1] = '\0';
}
}
- ber_pvt_log_output( subsys, level, "%s", line );
+ return ber_pvt_log_output( subsys, level, "%s", line );
}
#endif
(long) ber->ber_end,
(long) len );
- (*ber_pvt_log_print)( buf );
+ (void) (*ber_pvt_log_print)( buf );
ber_bprint( ber->ber_ptr, len );
}
LDAP_BEGIN_DECL
+typedef void (*BER_LOG_FN)(FILE *file,
+ const char *subsys, int level, const char *fmt, va_list vl );
+
LBER_V (BER_ERRNO_FN) ber_int_errno_fn;
struct lber_options {
# endif
#endif
+LBER_F( int ) ber_pvt_log_output(
+ const char *subsystem,
+ int level,
+ const char *fmt, ... );
+
#define LBER_UNINITIALIZED 0x0
#define LBER_INITIALIZED 0x1
#define LBER_VALID_BERELEMENT 0x2
LBER_RETSTR( WSA_E_NO_MORE )
LBER_RETSTR( WSA_E_CANCELLED )
LBER_RETSTR( WSAEREFUSED )
-#endif // HAVE_WINSOCK2
+#endif /* HAVE_WINSOCK2 */
LBER_RETSTR( WSAHOST_NOT_FOUND )
LBER_RETSTR( WSATRY_AGAIN )