diff options
| author | Arthur Schreiber <schreiber.arthur@googlemail.com> | 2014-01-14 21:33:35 +0100 |
|---|---|---|
| committer | Arthur Schreiber <schreiber.arthur@googlemail.com> | 2014-01-14 21:33:35 +0100 |
| commit | 29be3a6d9eee68b3964f34c498e64ce32452a57f (patch) | |
| tree | 050d954faf76b31b6b42538116f28006bfeac7ef /include/git2 | |
| parent | 76c00ead59f710a8dfeb6464eafcb4d65e26a7db (diff) | |
| download | libgit2-29be3a6d9eee68b3964f34c498e64ce32452a57f.tar.gz | |
Align git_signature_dup.
This changes git_signature_dup to actually honor oom conditions raised by
the call to git__strdup. It also aligns it with the error code return
pattern used everywhere else.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/signature.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/git2/signature.h b/include/git2/signature.h index 2fa46d032..a1dd1ec7a 100644 --- a/include/git2/signature.h +++ b/include/git2/signature.h @@ -68,10 +68,11 @@ GIT_EXTERN(int) git_signature_default(git_signature **out, git_repository *repo) * * Call `git_signature_free()` to free the data. * - * @param sig signature to duplicated - * @return a copy of sig, NULL on out of memory + * @param dest pointer where to store the copy + * @param entry signature to duplicate + * @return 0 or an error code */ -GIT_EXTERN(git_signature *) git_signature_dup(const git_signature *sig); +GIT_EXTERN(int) git_signature_dup(git_signature **dest, const git_signature *sig); /** * Free an existing signature. |
