From: Matthias Hardt Date: Mon, 9 Mar 2020 15:12:28 +0000 (+0100) Subject: commands_utils: indicate taking ownership of state_client_fd in X-Git-Tag: lxc-4.0.0~43^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd0dc360ce740ba302dacc3dc70c6b20b2a5f794;p=thirdparty%2Flxc.git commands_utils: indicate taking ownership of state_client_fd in lxc_add_state_client() Signed-off-by: Matthias Hardt --- diff --git a/src/lxc/commands_utils.c b/src/lxc/commands_utils.c index a8f1e1705..9237a7c69 100644 --- a/src/lxc/commands_utils.c +++ b/src/lxc/commands_utils.c @@ -171,7 +171,7 @@ int lxc_cmd_connect(const char *name, const char *lxcpath, return client_fd; } -int lxc_add_state_client(int state_client_fd, struct lxc_handler *handler, +int lxc_add_state_client(__owns int state_client_fd, struct lxc_handler *handler, lxc_state_t states[MAX_STATE]) { __do_free struct lxc_state_client *newclient = NULL; diff --git a/src/lxc/compiler.h b/src/lxc/compiler.h index ad9ac9033..92cd9fd14 100644 --- a/src/lxc/compiler.h +++ b/src/lxc/compiler.h @@ -52,6 +52,9 @@ #define __lxc_unused #endif +/* Indicates taking ownership */ +#define __owns + #define __cgfsng_ops #endif /* __LXC_COMPILER_H */