The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1863
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Christian Brauner <[email protected]>
From ab40f8c4c5065b5d873bade7b2344717f7c959a9 Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Wed, 18 Oct 2017 10:34:23 +0200 Subject: [PATCH] confile: use correct check on char array Signed-off-by: Christian Brauner <[email protected]> --- src/lxc/confile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 4adfeccc4..1a5f94cc6 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -3357,12 +3357,12 @@ static int get_config_network_item(const char *key, char *retv, int inlen, if (!netdev) return -1; if (strcmp(p1, "name") == 0) { - if (netdev->name) + if (netdev->name[0] != '\0') strprint(retv, inlen, "%s", netdev->name); } else if (strcmp(p1, "type") == 0) { strprint(retv, inlen, "%s", lxc_net_type_to_str(netdev->type)); } else if (strcmp(p1, "link") == 0) { - if (netdev->link) + if (netdev->link[0] != '\0') strprint(retv, inlen, "%s", netdev->link); } else if (strcmp(p1, "flags") == 0) { if (netdev->flags & IFF_UP) @@ -3404,7 +3404,7 @@ static int get_config_network_item(const char *key, char *retv, int inlen, } else if (strcmp(p1, "veth.pair") == 0) { if (netdev->type == LXC_NET_VETH) { strprint(retv, inlen, "%s", - netdev->priv.veth_attr.pair + netdev->priv.veth_attr.pair[0] != '\0' ? netdev->priv.veth_attr.pair : netdev->priv.veth_attr.veth1); }
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
