From: Hallvard Furuseth Date: Tue, 17 Aug 1999 21:14:03 +0000 (+0000) Subject: Fix printf formats: print msgtype as %lu, remove spurious sval arg in apitest X-Git-Tag: TWEB_OL_BASE~182 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2ae08eecad09b21737f6146bcea994f8f287648f;p=openldap Fix printf formats: print msgtype as %lu, remove spurious sval arg in apitest --- diff --git a/libraries/libldap/apitest.c b/libraries/libldap/apitest.c index 043729b7f6..94ba779400 100644 --- a/libraries/libldap/apitest.c +++ b/libraries/libldap/apitest.c @@ -184,7 +184,7 @@ main(int argc, char **argv) printf(" HOST NAME: %s\n", sval); ldap_memfree(sval); } else { - printf(" HOST NAME: \n", sval); + puts(" HOST NAME: "); } return EXIT_SUCCESS; diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index ba5648703b..a807d9c2e0 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -518,14 +518,15 @@ ldap_dump_requests_and_responses( LDAP *ld ) fprintf( stderr, " Empty\n" ); } for ( ; lm != NULL; lm = lm->lm_next ) { - fprintf( stderr, " * msgid %d, type %d\n", - lm->lm_msgid, lm->lm_msgtype ); + fprintf( stderr, " * msgid %d, type %lu\n", + lm->lm_msgid, (unsigned long) lm->lm_msgtype ); if (( l = lm->lm_chain ) != NULL ) { fprintf( stderr, " chained responses:\n" ); for ( ; l != NULL; l = l->lm_chain ) { fprintf( stderr, - " * msgid %d, type %d\n", - l->lm_msgid, l->lm_msgtype ); + " * msgid %d, type %lu\n", + l->lm_msgid, + (unsigned long) l->lm_msgtype ); } } } diff --git a/libraries/libldap/test.c b/libraries/libldap/test.c index 0ea3e5e1e8..e5178bbdc6 100644 --- a/libraries/libldap/test.c +++ b/libraries/libldap/test.c @@ -889,7 +889,8 @@ handle_result( LDAP *ld, LDAPMessage *lm ) break; default: - printf( "Unknown result type 0x%x\n", lm->lm_msgtype ); + printf( "Unknown result type 0x%lx\n", + (unsigned long) lm->lm_msgtype ); print_ldap_result( ld, lm, "unknown" ); } }