]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix build on mpc85xx
authorDaniel Golle <daniel@makrotopia.org>
Tue, 9 Jun 2015 10:58:12 +0000 (12:58 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 14 Aug 2015 17:18:35 +0000 (13:18 -0400)
Initialize ret to 0 so compiler no longer complains about
monitor.c: In function 'lxc_monitor_open':
monitor.c:212:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

https://github.com/openwrt/packages/issues/1356

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
src/lxc/monitor.c

index 3083c592804d9cc1955988baa24dab8decfa37e4..ada9a0b4978a63fcc93d0d7ff9e0ffe6c1d58087 100644 (file)
@@ -182,7 +182,7 @@ int lxc_monitor_sock_name(const char *lxcpath, struct sockaddr_un *addr) {
 int lxc_monitor_open(const char *lxcpath)
 {
        struct sockaddr_un addr;
-       int fd,ret;
+       int fd,ret = 0;
        int retry,backoff_ms[] = {10, 50, 100};
        size_t len;