diff options
author | Linus Nordberg <linus@nordberg.se> | 2019-04-26 00:37:46 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2019-04-26 00:37:46 +0200 |
commit | f35bce676d4cc5210b0c8684c2a516da069fd845 (patch) | |
tree | 6790d996c136e4f3d6c36339db20dcc3f4491c1b | |
parent | Remove 'now' (diff) | |
download | wg-dynamic-f35bce676d4cc5210b0c8684c2a516da069fd845.tar.xz wg-dynamic-f35bce676d4cc5210b0c8684c2a516da069fd845.zip |
Remove 'naptime'
-rw-r--r-- | wg-dynamic-client.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/wg-dynamic-client.c b/wg-dynamic-client.c index e561d44..b4cbab5 100644 --- a/wg-dynamic-client.c +++ b/wg-dynamic-client.c @@ -425,7 +425,6 @@ int main(int argc __attribute__((unused)), char *argv[] __attribute__((unused))) { int *fd = &our_fd; struct wg_dynamic_request req = { 0 }; - uint32_t naptime; progname = argv[0]; if (argc != 2) @@ -460,8 +459,7 @@ int main(int argc __attribute__((unused)), char *argv[] __attribute__((unused))) } while (1) { - naptime = time_until_refresh(current_time(), &our_lease); - sleep(MAX(1, naptime)); + sleep(MAX(1, time_until_refresh(current_time(), &our_lease))); if (*fd == -1 && try_connect(fd)) continue; |