Skip to content

Commit a88e881

Browse files
Apply code review
1 parent ed05c8e commit a88e881

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/optimizer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ get_index_for_executor(PyCodeObject *code, _Py_CODEUNIT *instr)
7272
}
7373
assert(size <= capacity);
7474
if (size == capacity) {
75-
if (capacity * 2 >= MAX_EXECUTORS_SIZE) {
76-
return -1;
77-
}
7875
/* Array is full. Grow array */
7976
int new_capacity = capacity ? capacity * 2 : 4;
77+
if (new_capacity >= MAX_EXECUTORS_SIZE) {
78+
return -1;
79+
}
8080
_PyExecutorArray *new = PyMem_Realloc(
8181
old,
8282
offsetof(_PyExecutorArray, executors) +

0 commit comments

Comments
 (0)