]> git.proxmox.com Git - mirror_lxc.git/commitdiff
commands_utils: indicate taking ownership of state_client_fd in
authorMatthias Hardt <matthias.hardt@gmail.com>
Mon, 9 Mar 2020 15:12:28 +0000 (16:12 +0100)
committerMatthias Hardt <matthias.hardt@gmail.com>
Mon, 9 Mar 2020 15:12:28 +0000 (16:12 +0100)
lxc_add_state_client()

Signed-off-by: Matthias Hardt <matthias.hardt@gmail.com>
src/lxc/commands_utils.c
src/lxc/compiler.h

index a8f1e1705516e56fe2b994628110f8cc801e129e..9237a7c69c6a6438e17622274541ca5356e75123 100644 (file)
@@ -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;
index ad9ac9033aabc3940819eb3b42e67d7761fc5179..92cd9fd141df999c85bd6ade784c4aa070bb7dfe 100644 (file)
@@ -52,6 +52,9 @@
 #define __lxc_unused
 #endif
 
+/* Indicates taking ownership */
+#define __owns
+
 #define __cgfsng_ops
 
 #endif /* __LXC_COMPILER_H */