]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/lockf.c
fix memory handling
[openldap] / libraries / liblutil / lockf.c
index 69c4009086854805492de33379945efd28969319..0ff7514639623c1a2c6670ddee1ecf9bc64c43c1 100644 (file)
@@ -1,12 +1,16 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License.  A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 /*
@@ -79,7 +83,7 @@ int lutil_unlockf ( int fd ) {
 int lutil_lockf ( int fd ) {
        struct flock file_lock;
 
-       memset( &file_lock, 0, sizeof( file_lock ) );
+       memset( &file_lock, '\0', sizeof( file_lock ) );
        file_lock.l_type = F_WRLCK;
        file_lock.l_whence = SEEK_SET;
        file_lock.l_start = 0;
@@ -92,7 +96,7 @@ int lutil_lockf ( int fd ) {
 int lutil_unlockf ( int fd ) {
        struct flock file_lock;
 
-       memset( &file_lock, 0, sizeof( file_lock ) );
+       memset( &file_lock, '\0', sizeof( file_lock ) );
        file_lock.l_type = F_UNLCK;
        file_lock.l_whence = SEEK_SET;
        file_lock.l_start = 0;