diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-26 22:14:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-26 22:14:45 +0200 |
commit | a03973893bdbc1a53c705daf70a73994ac46492f (patch) | |
tree | 3758c6cc01531475917705c32eb7bf93c4d04d9f /refs.c | |
parent | Merge branch 'mm/credential-libsecret' (diff) | |
parent | cocci: refactor common patterns to use xstrdup_or_null() (diff) | |
download | git-a03973893bdbc1a53c705daf70a73994ac46492f.tar.xz git-a03973893bdbc1a53c705daf70a73994ac46492f.zip |
Merge branch 'jc/cocci-xstrdup-or-null'
Code cleanup.
* jc/cocci-xstrdup-or-null:
cocci: refactor common patterns to use xstrdup_or_null()
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -816,8 +816,7 @@ struct ref_update *ref_transaction_add_update( hashcpy(update->new_sha1, new_sha1); if (flags & REF_HAVE_OLD) hashcpy(update->old_sha1, old_sha1); - if (msg) - update->msg = xstrdup(msg); + update->msg = xstrdup_or_null(msg); return update; } |