[lxc-devel] [lxc/master] minor fixes

brauner on Github lxc-bot at linuxcontainers.org
Fri Mar 1 20:17:18 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190301/407ed749/attachment.bin>
-------------- next part --------------
From c1b07e059f9951dd5183dc93f8dfc0051c2cb189 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 1 Mar 2019 21:15:20 +0100
Subject: [PATCH 1/2] conf: remove unused variable

Closes #2885.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/conf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index c0ac73be2a..a2a35c768e 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -2813,7 +2813,6 @@ static int idmaptool_on_path_and_privileged(const char *binary, cap_value_t cap)
 	__do_free char *path = NULL;
 	int ret;
 	struct stat st;
-	int fret = 0;
 
 	errno = EINVAL;
 	if (cap != CAP_SETUID && cap != CAP_SETGID)

From 0cacddda88fad144264d82c3ab05e478cd2d72e9 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 1 Mar 2019 21:15:49 +0100
Subject: [PATCH 2/2] confile: shut up gcc

Invalid warning but let's please the compiler.

Closes #2885.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/confile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index cecb65548e..120e9cddf8 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -2711,7 +2711,7 @@ int write_config(int fd, const struct lxc_conf *conf)
 bool do_append_unexp_config_line(struct lxc_conf *conf, const char *key,
 				 const char *v)
 {
-	__do_free char *tmp;
+	__do_free char *tmp = NULL;
 	int ret;
 	size_t len;
 


More information about the lxc-devel mailing list