From a701f7f4f3f8d6f9d97d5da49cc68affe1311e20 Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Mon, 22 Dec 2025 15:37:54 +0800 Subject: [PATCH] mmapmodule: remove unreachable code in Windows error path Remove an unreachable `return NULL` after `PyErr_SetFromWindowsErr()` in the Windows mmap resize error path. This is a pure cleanup with no behavior change. Signed-off-by: Yongtao Huang --- Modules/mmapmodule.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index ea20fb29c90228..0928ea6a8b70ba 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -963,7 +963,6 @@ mmap_mmap_resize_impl(mmap_object *self, Py_ssize_t new_size) if (error) { return PyErr_SetFromWindowsErr(error); - return NULL; } /* It's possible for a resize to fail, typically because another mapping is still held against the same underlying file. Even if nothing has