Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken for loop #250

Closed
HazemRawi opened this issue Apr 8, 2024 · 0 comments
Closed

Broken for loop #250

HazemRawi opened this issue Apr 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@HazemRawi
Copy link
Contributor

in main.c line 1655 there is a broken for loop that is never got executed because of the contradicted initialization of j and the j==-1 condition

            follow = -1;

            for (int j = 0; j == -1 && j < config->number_of_servers; j++)
            {
               if (!strcmp(config->servers[j].follow, config->servers[i].name))
               {
                  follow = j;
               }
            }

I think the author was about to write follow instead of j in the preceding condition.

@HazemRawi HazemRawi added the bug Something isn't working label Apr 8, 2024
HazemRawi added a commit to HazemRawi/pgmoneta that referenced this issue Apr 8, 2024
jesperpedersen pushed a commit that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants