From f5b07455d974969ee5eae2c529283034f275f82e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 6 Jul 2009 15:48:32 +0200 Subject: RAW-LOCK: fix a compiler warning and make a global static const metze --- source4/torture/raw/lock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4') 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, -- cgit