From d9e133312126438ff0f9ca9ad20091c6e2078daf Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 5 Mar 2015 10:54:15 +0100 Subject: [PATCH] fix ex1 code style --- ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c b/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c index 3444eea..8393cd8 100644 --- a/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c +++ b/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c @@ -4,7 +4,8 @@ int main(void) { size_t s = 0; - char *buf, dir = 1; + char *buf; + char dir = 1; for(size_t i = 1 << 31; i >= 1; i /= 2, free(buf)) dir = (buf = malloc(s += dir * i)) == NULL ? -1 : 1; printf("One malloc can allocate at most %zu bytes\n", s); -- 2.20.1