[lxc-devel] [PATCH] fix minor gcc 4.7.2 error

Dwight Engen dwight.engen at oracle.com
Tue May 21 17:15:53 UTC 2013


lxccontainer.c:874:4: error: ‘for’ loop initial declarations are only
allowed in C99 mode

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
 src/lxc/lxccontainer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 7ce25c6..2934afa 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -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;
-- 
1.8.1.4





More information about the lxc-devel mailing list