]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/lock.c
Remove lint
[openldap] / servers / slapd / lock.c
index 13fe405b14e1583526f4263c620a1748f4549bf6..79017f23a0dc4bac923e78f995e5d112476a9d85 100644 (file)
@@ -18,6 +18,7 @@
 #include <sys/file.h>
 #endif
 
+#include <lutil.h>
 #include "slap.h"
 
 FILE *
@@ -27,7 +28,8 @@ lock_fopen( const char *fname, const char *type, FILE **lfp )
        char    buf[MAXPATHLEN];
 
        /* open the lock file */
-       strcpy(lutil_strcopy( buf, fname ), ".lock" );
+       snprintf( buf, sizeof buf, "%s.lock", fname );
+
        if ( (*lfp = fopen( buf, "w" )) == NULL ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, ERR,