From bd089e60202a178d7c2725a57304b60b3a886a01 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Mon, 9 Mar 2015 15:49:08 +0100 Subject: [PATCH] thing --- .../exercise1.c | 2 +- .../exercise3.c | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 ass5a/sws1-assignment5-s4109503-s4202015/exercise3.c diff --git a/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c b/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c index 8393cd8..c4b9d06 100644 --- a/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c +++ b/ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c @@ -3,9 +3,9 @@ int main(void) { - size_t s = 0; char *buf; char dir = 1; + size_t s = 0; 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); diff --git a/ass5a/sws1-assignment5-s4109503-s4202015/exercise3.c b/ass5a/sws1-assignment5-s4109503-s4202015/exercise3.c deleted file mode 100644 index bbceb78..0000000 --- a/ass5a/sws1-assignment5-s4109503-s4202015/exercise3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -void function_b(void) -{ - char buffer[4]; - - printf("Executing function_b\n"); -} - -void function_a(void) -{ - int beacon = 0xa0b1c2d3; - printf("Executing function_a\n"); - function_b(); - printf("Executed function_b\n"); -} - -int main(void) -{ - function_a(); - printf("Finished!\n"); - return 0; -} -- 2.20.1