Skip to content
Snippets Groups Projects
Commit 2ae08eec authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

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

parent aeda441f
Branches
Tags
No related merge requests found
......@@ -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;
......
......@@ -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 );
}
}
}
......
......@@ -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" );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment