Mercurial > hg
changeset 21103:628c16489d1c
parsers: remove unnecessary gca variable in index_commonancestorsheads
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 17 Apr 2014 19:58:08 +0200 |
parents | 4eb6553789e1 |
children | 40ace21cb3a1 |
files | mercurial/parsers.c |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/parsers.c Mon Feb 24 22:42:14 2014 +0100 +++ b/mercurial/parsers.c Thu Apr 17 19:58:08 2014 +0200 @@ -1549,7 +1549,7 @@ */ static PyObject *index_commonancestorsheads(indexObject *self, PyObject *args) { - PyObject *ret = NULL, *gca = NULL; + PyObject *ret = NULL; Py_ssize_t argcount, i, len; bitmask repeat = 0; int revcount = 0; @@ -1620,22 +1620,16 @@ goto done; } - gca = find_gca_candidates(self, revs, revcount); - if (gca == NULL) + ret = find_gca_candidates(self, revs, revcount); + if (ret == NULL) goto bail; - ret = gca; - Py_INCREF(gca); - done: free(revs); - Py_XDECREF(gca); - return ret; bail: free(revs); - Py_XDECREF(gca); Py_XDECREF(ret); return NULL; }