]> git.sur5r.net Git - openldap/blobdiff - libraries/liblber/dtest.c
setting UFN prefix to NULL should clear prefix not cause crash.
[openldap] / libraries / liblber / dtest.c
index 3422873892aac41770776186e2feaa17afd9d853..749958b1ee708640bb02095eb34f3fd68242d251 100644 (file)
@@ -1,4 +1,5 @@
 /* dtest.c - lber decoding test program */
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>
 
+#include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/socket.h>
 #include <ac/unistd.h>
 
 #ifdef HAVE_CONSOLE_H
 #include <console.h>
-#endif /* MACOS */
+#endif
 
 #include <lber.h>
 
@@ -41,7 +42,8 @@ main( int argc, char **argv )
        char *s;
        int rc;
 
-       unsigned long tag, len;
+       ber_tag_t       tag;
+       ber_len_t       len;
 
        BerElement      *ber;
        Sockbuf         *sb;
@@ -58,7 +60,7 @@ main( int argc, char **argv )
 #ifdef HAVE_CONSOLE_H
        ccommand( &argv );
        cshow( stdout );
-#endif /* MACOS */
+#endif
 
        sb = ber_sockbuf_alloc_fd( fileno(stdin) );
 
@@ -73,7 +75,7 @@ main( int argc, char **argv )
        }
 
        printf("decode: message tag 0x%lx and length %ld\n",
-               tag, len );
+               (unsigned long) tag, (long) len );
 
        for( s = argv[1]; *s; s++ ) {
                char buf[128];