Merged
Conversation
wking
reviewed
Oct 11, 2017
| expectedCaps4 := make(map[string]bool) | ||
| expectedCaps5 := make(map[string]bool) | ||
| if spec.Process.Capabilities != nil { | ||
| if spec.Process != nil && spec.Process.Capabilities != nil { |
Contributor
There was a problem hiding this comment.
I'd rather move this guard to the top of this function, and have:
if spec.Process == nil || spec.Process.Capabilities == nil {
return nil
}I don't see the point to initializing processCaps, etc. when we aren't going to use them.
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
1babd18 to
6d2dbbc
Compare
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
440fad4 to
19b061c
Compare
1 similar comment
Member
wking
added a commit
to wking/ocitools-v2
that referenced
this pull request
Jan 12, 2018
6d2dbbc (runtimetest: fix nil deference, 2017-10-11, opencontainers#494) put the nil-Process guard in, but it was a bit too coarse. We can still run these tests with a nil Process, because all we need Process for is deciding whether or not to include /dev/console. Signed-off-by: W. Trevor King <wking@tremily.us>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com