diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-07-03 04:29:50 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-07-03 04:29:50 +0000 |
commit | e77cfe1379d92d2be4e2895454e14d11311a913d (patch) | |
tree | 55d88f89368fc2d276309b6a7a4af7a97cc855af | |
parent | 0a505e50a5059930de6583918f25ef84af53de0e (diff) | |
download | samba-e77cfe1379d92d2be4e2895454e14d11311a913d.tar.gz samba-e77cfe1379d92d2be4e2895454e14d11311a913d.tar.xz samba-e77cfe1379d92d2be4e2895454e14d11311a913d.zip |
See if we can stick to slightly valid C..
(With thanks to tpot)
Andrew Bartlett
-rw-r--r-- | source/torture/locktest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/torture/locktest.c b/source/torture/locktest.c index cee18624a45..ef6c9a978ac 100644 --- a/source/torture/locktest.c +++ b/source/torture/locktest.c @@ -59,14 +59,16 @@ struct record { char needed; }; +#define PRESETS 0 + +#if PRESETS static struct record preset[] = { -#if 0 {36, 5, 0, 0, 0, 8, 1}, { 2, 6, 0, 1, 0, 1, 1}, {53, 92, 0, 0, 0, 0, 1}, {99, 11, 0, 0, 7, 1, 1}, -#endif }; +#endif static struct record *recorded; @@ -378,9 +380,11 @@ static void test_locks(char *share[NSERVERS]) recorded = (struct record *)malloc(sizeof(*recorded) * numops); for (n=0; n<numops; n++) { +#if PRESETS if (n < sizeof(preset) / sizeof(preset[0])) { recorded[n] = preset[n]; } else { +#endif recorded[n].conn = random() % NCONNECTIONS; recorded[n].f = random() % NFILES; recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1)); @@ -391,7 +395,9 @@ static void test_locks(char *share[NSERVERS]) recorded[n].r1 = random() % 100; recorded[n].r2 = random() % 100; recorded[n].needed = True; +#if PRESETS } +#endif } reconnect(cli, fnum, share); |