Mercurial > public > mercurial-scm > hg
diff mercurial/cext/base85.c @ 34437:ce26a13869fb
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 02 Oct 2017 19:02:43 +0100 |
parents | 008d37c4d783 |
children | e1138fc2c4e2 |
line wrap: on
line diff
--- a/mercurial/cext/base85.c Mon Oct 02 19:17:04 2017 +0100 +++ b/mercurial/cext/base85.c Mon Oct 02 19:02:43 2017 +0100 @@ -96,14 +96,12 @@ 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 @@ (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 @@ 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; }