Skip to content

Commit 9b74d71

Browse files
dlechdpgeorge
authored andcommitted
py/runtime: Drop new_alloc < 4 check.
To reach this check, n_kw has to be >= 1 and therefore args2_alloc has to be >= 2. Therefore new_alloc will always be >= 4. So this check will never be true and can be removed. Signed-off-by: David Lechner <david@pybricks.com>
1 parent 3679a47 commit 9b74d71

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

py/runtime.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,9 +860,6 @@ void mp_call_prepare_args_n_kw_var(bool have_self, size_t n_args_n_kw, const mp_
860860
// expand size of args array if needed
861861
if (args2_len + 1 >= args2_alloc) {
862862
uint new_alloc = args2_alloc * 2;
863-
if (new_alloc < 4) {
864-
new_alloc = 4;
865-
}
866863
args2 = mp_nonlocal_realloc(args2, args2_alloc * sizeof(mp_obj_t), new_alloc * sizeof(mp_obj_t));
867864
args2_alloc = new_alloc;
868865
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy