* lock_file.c (krb5_lock_file): Initialize flock data on entry, but don't
authorKen Raeburn <raeburn@mit.edu>
Sat, 6 Mar 2004 00:54:48 +0000 (00:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 6 Mar 2004 00:54:48 +0000 (00:54 +0000)
bother with a static version to copy from.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16150 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/lock_file.c

index 90fe4df27d4b3757c6018f5b1a0b2ca53bf66cfe..e581ef4401ef40f204d03f3aecec9c525299a49c 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * lock_file.c (krb5_lock_file): Initialize flock data on entry,
+       but don't bother with a static version to copy from.
+
 2004-02-26  Jeffrey Altman <jaltman@mit.edu>
 
     * sendto_kdc.c, send524.c:
index 48af525d6505681b232d775df51914acd030a24f..3c07d8d635228d72d7ed5be19a2d2641eede6f1a 100644 (file)
@@ -68,10 +68,7 @@ krb5_lock_file(krb5_context context, int fd, int mode)
     krb5_error_code    retval = 0;
 #ifdef POSIX_FILE_LOCKS
     int lock_cmd = F_SETLKW;
-    static const struct flock flock_zero;
-    struct flock lock_arg;
-
-    lock_arg = flock_zero;
+    struct flock lock_arg = { 0 };
 #endif
 
     switch (mode & ~KRB5_LOCKMODE_DONTBLOCK) {