]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2003-10-30 sowmini.varadhan@sun.com
authorpaul <paul>
Thu, 30 Oct 2003 21:58:06 +0000 (21:58 +0000)
committerpaul <paul>
Thu, 30 Oct 2003 21:58:06 +0000 (21:58 +0000)
        * lib/pid_output.c: (pid_output_lock) undo paulj's mindless edit.

lib/pid_output.c

index e00e47ac611ec6ac9536f153a1e92c67c45b0337..125ca4031cc25d917cc54d5483a34208472aa31b 100644 (file)
@@ -56,8 +56,7 @@ pid_output_lock (char *path)
   int fd;
   pid_t pid;
   char buf[16];
-  struct flock lock = { .l_type = F_WRLCK,
-                        .l_whence = SEEK_END };
+  struct flock lock;  
 
   pid = getpid ();
 
@@ -72,6 +71,9 @@ pid_output_lock (char *path)
     {
       memset (&lock, 0, sizeof(lock));
 
+      lock.l_type = F_WRLCK;
+      lock.l_whence = SEEK_END;
+
       if (fcntl(fd, F_SETLK, &lock) < 0)
         {
           zlog_err("Could not lock pid_file %s, exit", path);