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 always true conditional #14

merged 1 commit into from Aug 8, 2017


None yet
2 participants

paraschetal commented Aug 6, 2017

While compiling with clang, this error comes up because g->vmname will always be non-NULL, although it may not have been set properly and therefore its value might be empty.

xside.c:2933:13: error: address of array 'g->vmname' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
    if (!g->vmname) {
1 error generated.
<builtin>: recipe for target 'xside.o' failed

I have made a small fix for this: initializing the g->vmname char array with '\0' just before it is set, and making the change in the conditional to see it remains empty.

@marmarek marmarek merged commit d441c49 into QubesOS:master Aug 8, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
policy/qubesos/code-signing Signed with 0E12409536B3420B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment