Skip to content

Commit

Permalink
dlm: last element of dlm_local_addr[] never used
Browse files Browse the repository at this point in the history
The last element of dlm_local_addr[DLM_MAX_ADDR_COUNT]
was not used because the loop ended at COUNT - 1.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
David Teigland committed Mar 21, 2012
1 parent 7210cb7 commit 1b189b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ static void init_local(void)
int i;

dlm_local_count = 0;
for (i = 0; i < DLM_MAX_ADDR_COUNT - 1; i++) {
for (i = 0; i < DLM_MAX_ADDR_COUNT; i++) {
if (dlm_our_addr(&sas, i))
break;

Expand Down

0 comments on commit 1b189b8

Please sign in to comment.