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

Redundant check in cookie_output() #695

Closed
Dmitry-Me opened this issue Mar 2, 2016 · 0 comments
Closed

Redundant check in cookie_output() #695

Dmitry-Me opened this issue Mar 2, 2016 · 0 comments

Comments

@Dmitry-Me
Copy link

cookie.c contains cookie_output() which caused a false positive in Cppcheck. Code goes like this:

  if((NULL == c) || (0 == c->numcookies))
    return 0;
  remove_expired(c);
 /* WHATEVER, doesn't change c */

  if(c) { /* WHATEVER */

The if(c) is redundant - if c is NULL then control never gets to the if.

@bagder bagder closed this as completed in 33a0a92 Mar 3, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant