8000 Remove a 'for' loop initial declaration. · m99coder/postgres_cluster@89451a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 89451a4

Browse files
committed
Remove a 'for' loop initial declaration.
1 parent 8a87698 commit 89451a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/raftable/raftable.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ static volatile WorkerConfig *sharedcfg;
5353

5454
static void select_next_server(void)
5555
{
56+
int i;
5657
int orig_leader = leader;
5758
SpinLockAcquire(&sharedcfg->lock);
58-
for (int i = 0; i < MAX_SERVERS; i++)
59+
for (i = 0; i < MAX_SERVERS; i++)
5960
{
6061
int idx = (orig_leader + i + 1) % MAX_SERVERS;
6162
volatile HostPort *hp = sharedcfg->peers + idx;

0 commit comments

Comments
 (0)
0