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

code practice (assign local variable rdb to global struct member) #3805

Closed
viennadd opened this issue Feb 12, 2017 · 2 comments
Closed

code practice (assign local variable rdb to global struct member) #3805

viennadd opened this issue Feb 12, 2017 · 2 comments

Comments

@viennadd
Copy link
Contributor

redis-check-rdb.c#L188 assign address of local variable rdb to global variable rdbstate.rio, so far I can't see it could cause any issues (rdb alive in all usage of rdbstate.rio), but still, not a good practice.

Regards.

@badboy
Copy link
Contributor

badboy commented Feb 12, 2017

Given that rdb is a static variable it won't cause issues.

@viennadd
Copy link
Contributor Author

viennadd commented Feb 12, 2017

@badboy
Oh, I am checking an old version of code, sorry. Indeed, static rdb won't be an issue,
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants