static int lkopen_flock (const char *, int, mode_t, int *);
#endif /* HAVE_FLOCK */
-static enum locktype init_locktype(const char *);
+static enum locktype init_locktype(const char *) PURE;
static int lkopen_dot (const char *, int, mode_t, int *);
static void lkclose_dot (int, const char *);
lockname (file, &lkinfo, 1);
}
+ close(fd);
*failed_to_lock = 1;
return -1;
}
fd = link(tmpfile, curlock);
(void) m_unlink(tmpfile);
- return (fd == -1 ? -1 : 0);
+ return fd == -1 ? -1 : 0;
}
#endif /* HAVE_LIBLOCKFILE */