]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106242: Minor fixup to avoid compiler warnings (GH-107983)
authorSteve Dower <steve.dower@python.org>
Tue, 15 Aug 2023 17:02:32 +0000 (18:02 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Aug 2023 17:02:32 +0000 (17:02 +0000)
Python/fileutils.c

index 0ffd9885fdc846316428c7085e560ce3bfc6bb79..9c4998397c4ac81259bd84dc7fc173911477aee0 100644 (file)
@@ -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;
     }