]> git.sur5r.net Git - openldap/commitdiff
Fix printf formats: print msgtype as %lu, remove spurious sval arg in apitest
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 17 Aug 1999 21:14:03 +0000 (21:14 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 17 Aug 1999 21:14:03 +0000 (21:14 +0000)
libraries/libldap/apitest.c
libraries/libldap/request.c
libraries/libldap/test.c

index 043729b7f6db89444f23d94e5789c8f9ad37ef6f..94ba779400adfb3f8163fedee11d4d1ce9d943a9 100644 (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;
index ba5648703b591440d1fcc1d49b3866d608c0e0c3..a807d9c2e0452c46e97ae6f2ac26669af76c2825 100644 (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 );
                        }
                }
        }
index 0ea3e5e1e8dfc8a35ac496aaac506786d4a8410c..e5178bbdc6e6dedfda65d188c8aff896122674b7 100644 (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" );
        }
 }