From: Mart Lubbers Date: Thu, 5 Mar 2015 09:54:15 +0000 (+0100) Subject: fix ex1 code style X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=d9e133312126438ff0f9ca9ad20091c6e2078daf;p=sws1-1415.git fix ex1 code style --- 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);