diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-03-18 14:05:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-03-18 14:05:45 +0000 |
commit | 9ccb736f1db4e18c644dccbd9f95f2b292b0b489 (patch) | |
tree | 739e84ba0177925a6e7c3512db201362dd29af4c /usr.sbin | |
parent | a22b50c081ffc2856e27ed25770bf5dfc2b9170f (diff) |
Initialize rsyncpid and httppid in the noop case. It seem gcc is not able
to realize that the pids are initialized if !noop and not accessed if noop.
OK job@ tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpki-client/main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 92d193924a7..07be2038cb6 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.119 2021/03/15 08:56:31 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.120 2021/03/18 14:05:44 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1018,8 +1018,10 @@ main(int argc, char *argv[]) close(fd[0]); rsync = fd[1]; - } else + } else { rsync = -1; + rsyncpid = -1; + } /* * Create a process that will fetch data via https. @@ -1051,8 +1053,10 @@ main(int argc, char *argv[]) close(fd[0]); http = fd[1]; - } else + } else { http = -1; + httppid = -1; + } if (pledge("stdio rpath wpath cpath fattr sendfd", NULL) == -1) err(1, "pledge"); |