From: neonene <53406459+neonene@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:09:26 +0000 (+0900) Subject: gh-123465: Ensure PyType_FromMetaclass avoids extra strcmp (GH-125460) X-Git-Tag: v3.14.0a2~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c9c6d3c1234e730c0beb2a6123e68fe98e57ede;p=thirdparty%2FPython%2Fcpython.git gh-123465: Ensure PyType_FromMetaclass avoids extra strcmp (GH-125460) use else --- diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 4af7f0273aae..a6cf3da542b6 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -4761,10 +4761,10 @@ PyType_FromMetaclass( if (strcmp(memb->name, "__weaklistoffset__") == 0) { weaklistoffset_member = memb; } - if (strcmp(memb->name, "__dictoffset__") == 0) { + else if (strcmp(memb->name, "__dictoffset__") == 0) { dictoffset_member = memb; } - if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { vectorcalloffset_member = memb; } }