From 6a00d27ae5bc3985de32d1cad6c734816df0098a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 16 Apr 2013 21:21:25 +0200 Subject: [PATCH] file: properly use container_of() to not trip type safety warnings --- file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/file.c b/file.c index ddbd61b..b0bdd99 100644 --- a/file.c +++ b/file.c @@ -381,7 +381,7 @@ static void rpc_file_exec_opipe_read_cb(struct ustream *s, int bytes) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, opipe); + container_of(s, struct rpc_file_exec_context, opipe.stream); if (ustream_read_buf_full(s)) rpc_file_exec_reply(c, UBUS_STATUS_NOT_SUPPORTED); @@ -391,7 +391,7 @@ static void rpc_file_exec_epipe_read_cb(struct ustream *s, int bytes) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, epipe); + container_of(s, struct rpc_file_exec_context, epipe.stream); if (ustream_read_buf_full(s)) rpc_file_exec_reply(c, UBUS_STATUS_NOT_SUPPORTED); @@ -401,7 +401,7 @@ static void rpc_file_exec_opipe_state_cb(struct ustream *s) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, opipe); + container_of(s, struct rpc_file_exec_context, opipe.stream); if (c->opipe.stream.eof && c->epipe.stream.eof) rpc_file_exec_reply(c, UBUS_STATUS_OK); @@ -411,7 +411,7 @@ static void rpc_file_exec_epipe_state_cb(struct ustream *s) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, epipe); + container_of(s, struct rpc_file_exec_context, epipe.stream); if (c->opipe.stream.eof && c->epipe.stream.eof) rpc_file_exec_reply(c, UBUS_STATUS_OK); -- 2.30.2