[Python-checkins] gh-106242: Minor fixup to avoid compiler warnings (GH-107983)

zooba webhook-mailer at python.org
Tue Aug 15 13:05:41 EDT 2023


https://github.com/python/cpython/commit/34e1917912f05e3ab5c9b1e39f678bd36388499e
commit: 34e1917912f05e3ab5c9b1e39f678bd36388499e
branch: main
author: Steve Dower <steve.dower at python.org>
committer: zooba <steve.dower at microsoft.com>
date: 2023-08-15T17:02:32Z
summary:

gh-106242: Minor fixup to avoid compiler warnings (GH-107983)

files:
M Python/fileutils.c

diff --git a/Python/fileutils.c b/Python/fileutils.c
index 0ffd9885fdc84..9c4998397c4ac 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -2383,7 +2383,7 @@ wchar_t *
 _Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *normsize)
 {
     assert(path != NULL);
-    if (!path[0] && size < 0 || size == 0) {
+    if ((size < 0 && !path[0]) || size == 0) {
         *normsize = 0;
         return path;
     }



More information about the Python-checkins mailing list