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

ManifestParser constructor accesses its first argument, don't pass NULL #479

Merged
merged 1 commit into from Jan 3, 2013

Conversation

nico
Copy link
Collaborator

@nico nico commented Jan 3, 2013

The constructor does

env_ = &state->bindings_;

so env_ is effectively set to offsetof(ManifestParser, bindings_). This
will blow up if env_ gets dereferenced -- this doesn't seem to happen in
these tests, but it's less confusing with this patch. Also, passing &state is
consistent with the rest of this test.

The constructor does

  env_ = &state->bindings_;

so env_ is effectively set to offsetof(ManifestParser, bindings_).  This
will blow up if env_ gets dereferenced -- this doesn't seem to happen in
these tests, but it's less confusing with this patch.  Also, passing &state is
consistent with the rest of this test.
@buildhive
Copy link

Evan Martin » ninja #277 SUCCESS
This pull request looks good
(what's this?)

evmar added a commit that referenced this pull request Jan 3, 2013
ManifestParser constructor accesses its first argument, don't pass NULL
@evmar evmar merged commit 8a4c9e0 into ninja-build:master Jan 3, 2013
@nico nico deleted the testfix branch January 3, 2013 16:21
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

Successfully merging this pull request may close these issues.

None yet

3 participants