Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add xzrealloc #4682

Merged
merged 14 commits into from
Oct 23, 2023
Merged

add xzrealloc #4682

merged 14 commits into from
Oct 23, 2023

Conversation

elliefm
Copy link
Contributor

@elliefm elliefm commented Oct 9, 2023

Adds an xzrealloc() function that's like xrealloc() but also zeroes out the newly allocated bytes if the allocation grew in size. n.b. It needs one more argument than regular xrealloc(), so it's not a drop-in replacement.

@elliefm elliefm marked this pull request as ready for review October 20, 2023 02:54
@elliefm elliefm requested review from rsto and ksmurchison October 20, 2023 02:54
Copy link
Member

@rsto rsto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just found one nit. And this PR again higlights how much code still uses int at places where we really want to use size_t 😔

imap/message.c Outdated Show resolved Hide resolved
Copy link
Contributor

@ksmurchison ksmurchison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove the stray memset() as pointed out by rsto. Once done, I approve without a re-review

imap/message.c Outdated Show resolved Hide resolved
@elliefm elliefm dismissed ksmurchison’s stale review October 22, 2023 22:46

requested changes applied; re-review not required

@elliefm elliefm merged commit d093790 into cyrusimap:master Oct 23, 2023
@elliefm elliefm deleted the v39/xzrealloc branch October 23, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants