]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/sanity.c
filecheck(), we should strcpy the file passed (f arg) and not always slapd_replogfile...
[openldap] / servers / slurpd / sanity.c
index 04be7db86af87d728e9f03c83735cd62d3587613..ab6880c0b0c09686d961372ed63d270b42db2e69 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
  * feedback to the users.
  */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <unistd.h>
-#include <string.h>
+
+#include <ac/unistd.h>
+#include <ac/string.h>
 
 #include "slurp.h"
 #include "globals.h"
-#include "portable.h"
 
 #define FC_DIRBAD      1
 #define FC_DIRUNREAD   2
 /*
  * Forward declarations
  */
-#ifdef NEEDPROTOS
-static unsigned int filecheck( char * );
-#else /* NEEDPROTOS */
-static unsigned int filecheck();
-#endif /* NEEDPROTOS */
+static unsigned int filecheck LDAP_P(( char * ));
 
 
 
@@ -58,7 +57,7 @@ static unsigned int filecheck();
  */
 
 int
-sanity()
+sanity( void )
 {
     int        err = 0;
     int rc;
@@ -175,7 +174,7 @@ filecheck(
     char               *p;
     unsigned int       ret = 0;
 
-    strcpy( dir, sglob->slapd_replogfile );
+    strcpy( dir, f );
     p = strrchr( dir, '/' );
     if ( p != NULL ) {
        *p = '\0';
@@ -201,4 +200,3 @@ filecheck(
 
     return ret;
 }
-