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 Issue] Unnecessary assignment? #164

Open
microwish opened this issue Dec 6, 2019 · 0 comments
Open

[Code Issue] Unnecessary assignment? #164

microwish opened this issue Dec 6, 2019 · 0 comments

Comments

@microwish
Copy link

microwish commented Dec 6, 2019

Looks like sometimes this assignment env->kvs = envs; in the body of Environment::Init method in env.h (

env->kvs = envs;
) is not necessary.

Assume we don't expect to re-assign new environment variables once we already assigned non-empty values, it might be better if we first check whetherEnvironment::kvs is empty, if it's empty, we can do this assignment, otherwise, we won't.

If I'm on the track, would like to make a PR.

Thanks.

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

1 participant