]> granicus.if.org Git - python/commitdiff
Issue #28333: Remove unnecessary increment.
authorSteve Dower <steve.dower@microsoft.com>
Sat, 8 Oct 2016 19:20:45 +0000 (12:20 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Sat, 8 Oct 2016 19:20:45 +0000 (12:20 -0700)
Parser/myreadline.c

index 4f7a9fcc92c0119eb8f03b358882e01ff3ed90fb..e40951ca33eecfcb702228a2a2a2c99d78fc73ef 100644 (file)
@@ -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);