]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix minor gcc 4.7.2 error
authorDwight Engen <dwight.engen@oracle.com>
Tue, 21 May 2013 17:15:53 +0000 (13:15 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 21 May 2013 17:19:09 +0000 (13:19 -0400)
lxccontainer.c:874:4: error: ‘for’ loop initial declarations are only
allowed in C99 mode

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxccontainer.c

index 7ce25c6d85be25c29b9697f0bb845530c77e184a..2934afa51647f8f43fc97595fac491f7e1c9fc83 100644 (file)
@@ -871,7 +871,8 @@ out:
                count++;
                temp = realloc(addresses, count * sizeof(*addresses));
                if (!temp) {
-                       for (int i = 0; i < count-1; i++)
+                       int i;
+                       for (i = 0; i < count-1; i++)
                                free(addresses[i]);
                        free(addresses);
                        return NULL;