Fix printf formats: print msgtype as %lu, remove spurious sval arg in apitest

This commit is contained in:
Hallvard Furuseth 1999-08-17 21:14:03 +00:00
parent aeda441fc4
commit 2ae08eecad
3 changed files with 8 additions and 6 deletions

View File

@ -184,7 +184,7 @@ main(int argc, char **argv)
printf(" HOST NAME: %s\n", sval);
ldap_memfree(sval);
} else {
printf(" HOST NAME: <not set>\n", sval);
puts(" HOST NAME: <not set>");
}
return EXIT_SUCCESS;

View File

@ -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 );
}
}
}

View File

@ -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" );
}
}