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

Unused variable 'loose' in memhog.c #50

Closed
sanskriti-s opened this issue Nov 27, 2018 · 1 comment
Closed

Unused variable 'loose' in memhog.c #50

sanskriti-s opened this issue Nov 27, 2018 · 1 comment

Comments

@sanskriti-s
Copy link

In memhog.c, the variable loose is iniltialzed to 0. It is then set to 1 in an else statement on line 105 . However, the connected if statement includes an exit. Thus if the program doesn't exit, it sets loose =1. Therefore, the usage of loose in lines 132 and 136 are redundant. Should loose be completely removed or does it serve some purpose that is now broken?

@andikleen
Copy link
Contributor

I guess the exit(1) in the check is wrong. The idea was to be able to run it without NUMA support.

sanskriti-s pushed a commit to sanskriti-s/numactl that referenced this issue Nov 28, 2018
Solves issue numactl#50
Signed-off-by: Sanskriti sharma <sansharm@redhat.com>
andikleen pushed a commit that referenced this issue Nov 28, 2018
Solves issue #50
Signed-off-by: Sanskriti sharma <sansharm@redhat.com>
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