Navigation Menu

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

Fix some Codacy warnings about redundant assignment #3873

Closed
wants to merge 3 commits into from

Conversation

MarcelRaad
Copy link
Member

Remove a useless variable, narrow a variable scope, and initialize a variable with the correct value to fix them.

@MarcelRaad MarcelRaad changed the title Fix some Codacy warning about redundant assignment Fix some Codacy warnings about redundant assignment May 12, 2019
@MarcelRaad
Copy link
Member Author

The "new" Codacy warning is just from moved code.

lib/ssh-libssh.c Outdated
curl_socket_t sock = conn->sock[FIRSTSOCKET];
curl_socket_t fd_read = CURL_SOCKET_BAD;
fd_read = sock;
curl_socket_t fd_read = conn->sock[FIRSTSOCKET;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request May 13, 2019
sock was only used to be assigned to fd_read.

Closes curl#3873
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request May 13, 2019
This way, we need only one call to free.

Closes curl#3873
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request May 13, 2019
Just initialize word_begin with the correct value.

Closes curl#3873
sock was only used to be assigned to fd_read.

Closes curl#3873
This way, we need only one call to free.

Closes curl#3873
Just initialize word_begin with the correct value.

Closes curl#3873
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request May 20, 2019
This way, we need only one call to free.

Closes curl#3873
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request May 20, 2019
Just initialize word_begin with the correct value.

Closes curl#3873
@MarcelRaad MarcelRaad deleted the codacy_redundantassignment branch May 20, 2019 06:10
@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants