]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112075: Remove compiler warning from apple clang (gh-115855)
authorDonghee Na <donghee.na@python.org>
Wed, 28 Feb 2024 17:51:59 +0000 (02:51 +0900)
committerGitHub <noreply@github.com>
Wed, 28 Feb 2024 17:51:59 +0000 (02:51 +0900)
Objects/dictobject.c

index 5ae4c3dbea238006d470aa20aad87399a44fcbce..58fe973bc7a0361ababe0a74fc57d0c96a8a169e 100644 (file)
@@ -5029,7 +5029,7 @@ dictiter_iternextkey(PyObject *self)
 
     PyObject *value;
 #ifdef Py_GIL_DISABLED
-    if (!dictiter_iternext_threadsafe(d, self, &value, NULL) == 0) {
+    if (dictiter_iternext_threadsafe(d, self, &value, NULL) < 0) {
         value = NULL;
     }
 #else
@@ -5152,7 +5152,7 @@ dictiter_iternextvalue(PyObject *self)
 
     PyObject *value;
 #ifdef Py_GIL_DISABLED
-    if (!dictiter_iternext_threadsafe(d, self, NULL, &value) == 0) {
+    if (dictiter_iternext_threadsafe(d, self, NULL, &value) < 0) {
         value = NULL;
     }
 #else