From 7a2647e9505338efd8a5712f15208ebd67450e76 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 13 Mar 2021 16:42:08 +0100 Subject: nq: initialize fd with -1 instead of a possible valid value --- nq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- cgit 1.4.1