]> 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>
Wed, 1 Jul 2015 17:44:46 +0000 (13:44 -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 0e56f75ee88dc788683297c1ad73ecaafb14f5a9..3741586844df219db9feca9b565f9d987eab0e44 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;