commit bd2e8c0038f456dc8be91fb4625e74815703ed7a
parent 97f3ec06fcd5cc02a5f1433281200544f1ed1876
Author: sin <sin@2f30.org>
Date: Fri, 1 Mar 2013 16:15:11 +0000
Just use memset in the test program, limits the output
Diffstat:
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/test.c b/test.c
@@ -1,16 +1,12 @@
#include <stdio.h>
#include <string.h>
-char buf[128] __attribute__ ((section ("TRACED_AREA"))) = { 0 };
+char buf[64] __attribute__ ((section ("TRACED_AREA"))) = { 0 };
int
main(void)
{
- size_t i;
- char *p = buf;
-
fprintf(stderr, "buf is at %p\n", buf);
- for (i = 0; i < sizeof(buf); i++)
- p[i] = 0x41 + i;
+ memset(buf, 0x41, sizeof(buf));
return 0;
}