about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-03-13 16:42:08 +0100
committerLeah Neukirchen <leah@vuxu.org>2021-03-13 16:42:08 +0100
commit7a2647e9505338efd8a5712f15208ebd67450e76 (patch)
tree411abef87a504e579e091e0e3ed3fb064b20aaca
parenta377c0550bb92b3d03a54b2f6edf3248bf80d61a (diff)
downloadnq-7a2647e9505338efd8a5712f15208ebd67450e76.tar.gz
nq-7a2647e9505338efd8a5712f15208ebd67450e76.tar.xz
nq-7a2647e9505338efd8a5712f15208ebd67450e76.zip
nq: initialize fd with -1 instead of a possible valid value
-rw-r--r--nq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nq.c b/nq.c
index 5feb7b7..6d3d919 100644
--- a/nq.c
+++ b/nq.c
@@ -107,7 +107,7 @@ int
 main(int argc, char *argv[])
 {
 	int64_t ms;
-	int dirfd = 0, donedirfd = 0, lockfd = 0;
+	int dirfd = -1, donedirfd = -1, lockfd = -1;
 	int opt = 0, cflag = 0, qflag = 0, tflag = 0, wflag = 0;
 	int pipefd[2];
 	char lockfile[64], newestlocked[64];