# HG changeset patch # User Yuya Nishihara # Date 1439630998 -32400 # Node ID 2a3010ba6f5234c4153f6295ecc7e39ef40d853a # Parent 8da628be211b3bd84a0e28b1b0a4bec94590326e reachableroots: give anonymous name to short-lived "numheads" variable I'll reuse it for the length of the roots list. diff -r 8da628be211b -r 2a3010ba6f52 mercurial/parsers.c --- a/mercurial/parsers.c Sat Aug 15 18:03:47 2015 +0900 +++ b/mercurial/parsers.c Sat Aug 15 18:29:58 2015 +0900 @@ -1114,7 +1114,6 @@ int includepath = 0; /* heads is a list */ PyObject *heads = NULL; - Py_ssize_t numheads; /* roots is a set */ PyObject *roots = NULL; PyObject *reachable = NULL; @@ -1124,6 +1123,7 @@ long revnum; Py_ssize_t k; Py_ssize_t i; + Py_ssize_t l; int r; int minidx; int parents[2]; @@ -1164,8 +1164,8 @@ } /* Populate tovisit with all the heads */ - numheads = PyList_GET_SIZE(heads); - for (i = 0; i < numheads; i++) { + l = PyList_GET_SIZE(heads); + for (i = 0; i < l; i++) { revnum = PyInt_AsLong(PyList_GET_ITEM(heads, i)); if (revnum == -1 && PyErr_Occurred()) goto bail;