From e4668aade91dca363c7b346d8b37d04c5191522b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 13 Sep 2016 21:48:57 -0700 Subject: fix misleading indentation (closes #28139) --- Modules/_localemodule.c | 34 +++++++++++++++++----------------- Modules/cjkcodecs/multibytecodec.c | 2 +- Python/ast.c | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index fe7b098..e497a8f 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -172,23 +172,23 @@ PyLocale_setlocale(PyObject* self, PyObject* args) #endif if (locale) { - /* set locale */ - result = setlocale(category, locale); - if (!result) { - /* operation failed, no setting was changed */ - PyErr_SetString(Error, "unsupported locale setting"); - return NULL; - } - result_object = PyString_FromString(result); - if (!result_object) - return NULL; - /* record changes to LC_CTYPE */ - if (category == LC_CTYPE || category == LC_ALL) - fixup_ulcase(); + /* set locale */ + result = setlocale(category, locale); + if (!result) { + /* operation failed, no setting was changed */ + PyErr_SetString(Error, "unsupported locale setting"); + return NULL; + } + result_object = PyString_FromString(result); + if (!result_object) + return NULL; + /* record changes to LC_CTYPE */ + if (category == LC_CTYPE || category == LC_ALL) + fixup_ulcase(); /* things that got wrong up to here are ignored */ PyErr_Clear(); } else { - /* get locale */ + /* get locale */ result = setlocale(category, NULL); if (!result) { PyErr_SetString(Error, "locale query failed"); @@ -297,9 +297,9 @@ PyLocale_strcoll(PyObject* self, PyObject* args) } /* Convert the non-unicode argument to unicode. */ if (!PyUnicode_Check(os1)) { - os1 = PyUnicode_FromObject(os1); - if (!os1) - return NULL; + os1 = PyUnicode_FromObject(os1); + if (!os1) + return NULL; rel1 = 1; } if (!PyUnicode_Check(os2)) { diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 376f8ee..2f2eb52 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -531,7 +531,7 @@ multibytecodec_encode(MultibyteCodec *codec, if (_PyString_Resize(&buf.outobj, finalsize) == -1) goto errorexit; - *data = buf.inbuf; + *data = buf.inbuf; Py_XDECREF(buf.excobj); return buf.outobj; diff --git a/Python/ast.c b/Python/ast.c index 2b7aed8..318c0bb 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -2284,7 +2284,7 @@ ast_for_print_stmt(struct compiling *c, const node *n) dest = ast_for_expr(c, CHILD(n, 2)); if (!dest) return NULL; - start = 4; + start = 4; } values_count = (NCH(n) + 1 - start) / 2; if (values_count) { -- cgit v0.12