Re: [PATCH v4 0/1] MR3736: winmm: Use CRT allocation functions.
13 Sep
2023
13 Sep
'23
3:16 a.m.
On Wed Sep 13 02:57:29 2023 +0000, Alex Henrie wrote:
You're right that it's unnecessary to cast the void pointer returned from malloc or realloc, so I've removed those casts. Thanks for pointing that out. As far as the casts in the calls to free, they are all to avoid warnings about freeing pointers to const strings, so they can't be removed. No, never mind, it's necessary to cast the pointers returned from malloc and realloc here because we add 1 to the pointer before assigning it to a variable. It's unusual but it works. Still, we could simplify this code a bit by only calling realloc.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3736#note_45138
904
Age (days ago)
904
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alex Henrie (@alexhenrie)