commit 9114dd430297e408815019c3bc1df29ba10a9fb8 from: Mark Jamsek date: Tue Jan 10 10:47:07 2023 UTC fix uninitialised fildes variables in libexec helpers Reviewed and uncovered as part of the diff in the forthcoming commit (pathlist API refactor). ok stsp@ commit - a76e88e58fb716d5dded83442b153b60687283cb commit + 9114dd430297e408815019c3bc1df29ba10a9fb8 blob - 07e2042c17a6d66588622b9d6a7fb1e9c158cfbd blob + 5182c2cb22cbbc1bcbddfb3d184b514aacd5d390 --- libexec/got-fetch-pack/got-fetch-pack.c +++ libexec/got-fetch-pack/got-fetch-pack.c @@ -777,7 +777,7 @@ int main(int argc, char **argv) { const struct got_error *err = NULL; - int fetchfd, packfd = -1; + int fetchfd = -1, packfd = -1; uint8_t pack_sha1[SHA1_DIGEST_LENGTH]; struct imsgbuf ibuf; struct imsg imsg; blob - 1d25734c98460f62110adce7185d5a73c017c8ad blob + efef14d8b8bcda29b4ed82144fab2545d821216e --- libexec/got-send-pack/got-send-pack.c +++ libexec/got-send-pack/got-send-pack.c @@ -609,7 +609,7 @@ int main(int argc, char **argv) { const struct got_error *err = NULL; - int sendfd; + int sendfd = -1; struct imsgbuf ibuf; struct imsg imsg; struct got_pathlist_head refs;