]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/setproctitle.c
close registry, and return static pointer (no free) from getRegParam
[openldap] / libraries / liblutil / setproctitle.c
index 534a69bfe6b5e2f85d070f6f535da841c1b4044d..6578a8089504925f1c8da910ae11ed5342de9635 100644 (file)
@@ -3,7 +3,8 @@
 #ifndef HAVE_SETPROCTITLE
 
 #include <stdio.h>
-#include <stdlib.h>
+
+#include <ac/stdlib.h>
 
 #include <ac/setproctitle.h>
 #include <ac/string.h>
@@ -34,8 +35,7 @@ void setproctitle
 #if defined( HAVE_STDARG )
        ( const char *fmt, ... )
 #else
-       ( fmt, va_alist )
-const char *fmt;
+       ( va_alist )
 va_dcl
 #endif
 {
@@ -48,7 +48,10 @@ va_dcl
 #if defined( HAVE_STDARG )
        va_start(ap, fmt);
 #else
+       const char *fmt;
+
        va_start(ap);
+       fmt = va_arg(ap, const char *);
 #endif
 
 #ifdef HAVE_VSNPRINTF