thing
authorMart Lubbers <mart@martlubbers.net>
Mon, 9 Mar 2015 14:49:08 +0000 (15:49 +0100)
committerMart Lubbers <mart@martlubbers.net>
Mon, 9 Mar 2015 14:49:08 +0000 (15:49 +0100)
ass4/mart/sws1-assignment4-s4109503-s4202015/exercise1.c
ass5a/sws1-assignment5-s4109503-s4202015/exercise3.c [deleted file]

index 8393cd8..c4b9d06 100644 (file)
@@ -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 (file)
index bbceb78..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <stdio.h>
-
-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;
-}