diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-06 15:48:32 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-06 15:49:44 +0200 |
commit | f5b07455d974969ee5eae2c529283034f275f82e (patch) | |
tree | df6db0153653b46f16b4bd369f25ef48b6e456e7 /source4 | |
parent | ad17cf1772dfa34b8c691df372a1118575e62692 (diff) | |
download | samba-f5b07455d974969ee5eae2c529283034f275f82e.tar.gz samba-f5b07455d974969ee5eae2c529283034f275f82e.tar.bz2 samba-f5b07455d974969ee5eae2c529283034f275f82e.zip |
RAW-LOCK: fix a compiler warning and make a global static const
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/raw/lock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c index 9d7fb254fe..0228837add 100644 --- a/source4/torture/raw/lock.c +++ b/source4/torture/raw/lock.c @@ -1326,7 +1326,7 @@ struct double_lock_test { /** * Tests zero byte locks. */ -struct double_lock_test zero_byte_tests[] = { +static const struct double_lock_test zero_byte_tests[] = { /* {pid, offset, count}, {pid, offset, count}, status */ /** First, takes a zero byte lock at offset 10. Then: @@ -1360,7 +1360,6 @@ struct double_lock_test zero_byte_tests[] = { static bool test_zerobytelocks(struct torture_context *tctx, struct smbcli_state *cli) { union smb_lock io; - struct smb_lock_entry zerozero; NTSTATUS status; bool ret = true; int fnum, i; @@ -1389,7 +1388,7 @@ static bool test_zerobytelocks(struct torture_context *tctx, struct smbcli_state * assumed to succeed. The second lock may contend, depending on the * expected status. */ for (i = 0; - i < sizeof(zero_byte_tests) / sizeof(struct double_lock_test); + i < ARRAY_SIZE(zero_byte_tests); i++) { torture_comment(tctx, " ... {%d, %llu, %llu} + {%d, %llu, %llu} = %s\n", zero_byte_tests[i].lock1.pid, |