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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy