diff options
| -rw-r--r-- | include/git2/submodule.h | 2 | ||||
| -rw-r--r-- | src/submodule.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 857c62f89..29d8bc1ce 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -227,7 +227,7 @@ GIT_EXTERN(int) git_submodule_lookup( * Create an in-memory copy of a submodule. The copy must be explicitly * free'd or it will leak. * - * @param out Pointer to store the copy of the submodule. Cannot be NULL. + * @param out Pointer to store the copy of the submodule. * @param source Original submodule to copy. */ GIT_EXTERN(int) git_submodule_dup(git_submodule **out, git_submodule *source); diff --git a/src/submodule.c b/src/submodule.c index ee31bd8a0..7cbb9fa3a 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1857,9 +1857,9 @@ static void submodule_release(git_submodule *sm) int git_submodule_dup(git_submodule **out, git_submodule *source) { GIT_ASSERT_ARG(out); + GIT_ASSERT_ARG(source); - if (source != NULL) - GIT_REFCOUNT_INC(source); + GIT_REFCOUNT_INC(source); *out = source; return 0; |
