Commit 14b2eb05 authored by Matthias Braun's avatar Matthias Braun
Browse files

make testapp deterministic

parent bc48dbf6
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "dumpmem.h" #include "dumpmem.h"
struct bf { struct bf {
...@@ -19,7 +20,8 @@ struct bf { ...@@ -19,7 +20,8 @@ struct bf {
int main(int argc, char **argv) { int main(int argc, char **argv) {
struct bf mybf = { 0xffffffff, 4097, 65537, 5, 0xff, 4.5, 257 }; struct bf mybf = { 0xffffffff, 4097, 65537, 5, 0xff, 4.5, 257 };
dumpMem(&mybf, sizeof mybf); if(argc > 1)
dumpMem(&mybf, sizeof mybf);
printf("sizeof mybf %d\n", sizeof mybf); printf("sizeof mybf %d\n", sizeof mybf);
printf("offset a = %d\n", offsetof(struct bf, a)); printf("offset a = %d\n", offsetof(struct bf, a));
printf("offset c = %d\n", offsetof(struct bf, c)); printf("offset c = %d\n", offsetof(struct bf, c));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment