summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-03 11:36:31 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-03 11:36:31 +0200
commit27c24c7c186ad6522995872a9fe380dd1545af9a (patch)
tree11a8db62a26aa708d48f2763773c8f0af8c6d24c
parent345363bf473fc6d2e35667758c3588d7f379b86f (diff)
downloadrpcd-27c24c7c186ad6522995872a9fe380dd1545af9a.tar.gz
rpcd: sys: actually move timespec declaration
Move the timespec declaration to the function header, as mentioned in commit "rpcd: Switch to nanosleep". Fixes: 604db20 ("rpcd: Switch to nanosleep") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys.c b/sys.c
index 2d83522..60ff5d6 100644
--- a/sys.c
+++ b/sys.c
@@ -88,6 +88,7 @@ rpc_cgi_password_set(struct ubus_context *ctx, struct ubus_object *obj,
ssize_t n;
int ret;
const char *const passwd = "/bin/passwd";
+ const struct timespec req = {0, 100 * 1000 * 1000};
blobmsg_parse(rpc_password_policy, __RPC_P_MAX, tb,
blob_data(msg), blob_len(msg));
@@ -145,7 +146,6 @@ rpc_cgi_password_set(struct ubus_context *ctx, struct ubus_object *obj,
if (n < 0)
return rpc_errno_status();
- const struct timespec req = {0, 100 * 1000 * 1000};
nanosleep(&req, NULL);
n = write(fds[1], blobmsg_data(tb[RPC_P_PASSWORD]),