From: Steve Dower Date: Sat, 8 Oct 2016 19:20:45 +0000 (-0700) Subject: Issue #28333: Remove unnecessary increment. X-Git-Tag: v3.6.0b2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59bd34fa8a58ca787152ca1bfd589dde3656ea91;p=python Issue #28333: Remove unnecessary increment. --- diff --git a/Parser/myreadline.c b/Parser/myreadline.c index 4f7a9fcc92..e40951ca33 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -218,7 +218,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) int wlen; wlen = MultiByteToWideChar(CP_UTF8, 0, prompt, -1, NULL, 0); - if (wlen++ && + if (wlen && (wbuf = PyMem_RawMalloc(wlen * sizeof(wchar_t)))) { wlen = MultiByteToWideChar(CP_UTF8, 0, prompt, -1, wbuf, wlen);