# HG changeset patch # User Mads Kiilerich # Date 2014-04-17 17:58:08 # Node ID 628c16489d1cec98f0f43a784375ff4fefb0dc52 # Parent 4eb6553789e1da54f5dd816774dc1ec6bce68092 parsers: remove unnecessary gca variable in index_commonancestorsheads diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -1549,7 +1549,7 @@ bail: */ 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 @@ static PyObject *index_commonancestorshe 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; }