# HG changeset patch # User Gregory Szorc # Date 2017-10-02 18:02:43 # Node ID ce26a13869fb48d81e1fcb5193e631180d75312b # Parent c1fe66e89f57ed7689697f566acefd4673484bce cext: move braces for control statements to same line This seems to be the prevailing style in the code by a wide margin. Differential Revision: https://phab.mercurial-scm.org/D907 diff --git a/mercurial/cext/base85.c b/mercurial/cext/base85.c --- a/mercurial/cext/base85.c +++ b/mercurial/cext/base85.c @@ -96,14 +96,12 @@ static PyObject *b85decode(PyObject *sel dst = PyBytes_AsString(out); i = 0; - while (i < len) - { + while (i < len) { acc = 0; cap = len - i - 1; if (cap > 4) cap = 4; - for (j = 0; j < cap; i++, j++) - { + for (j = 0; j < cap; i++, j++) { c = b85dec[(int)*text++] - 1; if (c < 0) return PyErr_Format( @@ -112,8 +110,7 @@ static PyObject *b85decode(PyObject *sel (int)i); acc = acc * 85 + c; } - if (i++ < len) - { + if (i++ < len) { c = b85dec[(int)*text++] - 1; if (c < 0) return PyErr_Format( @@ -136,8 +133,7 @@ static PyObject *b85decode(PyObject *sel acc *= 85; if (cap && cap < 4) acc += 0xffffff >> (cap - 1) * 8; - for (j = 0; j < cap; j++) - { + for (j = 0; j < cap; j++) { acc = (acc << 8) | (acc >> 24); *dst++ = acc; } diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -445,8 +445,7 @@ static Py_ssize_t add_roots_get_min(inde iter = PyObject_GetIter(list); if (iter == NULL) return -2; - while ((iter_item = PyIter_Next(iter))) - { + while ((iter_item = PyIter_Next(iter))) { iter_item_long = PyInt_AS_LONG(iter_item); Py_DECREF(iter_item); if (iter_item_long < min_idx)