opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit 5054c7a52d950e0f66a088689a36ca5999987c97
parent 89c2c8ede00aedc3426fc89761a9e8fc7cf43572
Author: Duncaen <mail@duncano.de>
Date:   Tue, 12 Dec 2017 16:38:08 +0100

persist_timestamp: remove goto from persist_open

Diffstat:
Mpersist_timestamp.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/persist_timestamp.c b/persist_timestamp.c @@ -279,13 +279,11 @@ persist_open(int *valid, int secs) * If the size does not match the expected size it * is incomplete and should never be used */ - if (tssize == 0) - goto ret; - else if (tssize != sizeof(struct timespec) * 2) + if (tssize == sizeof(struct timespec) * 2) + *valid = validts(fd, secs) == 0; + else if (tssize != 0) errx(1, "corrupt timestamp file"); - *valid = validts(fd, secs) == 0; -ret: close(dirfd); return fd; }