Skip to content

Make stdalloc__reallocarray call stdalloc__realloc#4986

Merged
pks-t merged 1 commit intolibgit2:masterfrom
lhchavez:realloc
Feb 20, 2019
Merged

Make stdalloc__reallocarray call stdalloc__realloc#4986
pks-t merged 1 commit intolibgit2:masterfrom
lhchavez:realloc

Conversation

@lhchavez
Copy link
Copy Markdown
Contributor

This change avoids calling realloc(3) in more than one place.

This change avoids calling realloc(3) in more than one place.
@ethomson
Copy link
Copy Markdown
Member

This change avoids calling realloc(3) in more than one place.

What's the advantage of avoiding that?

@lhchavez
Copy link
Copy Markdown
Contributor Author

consistency, i guess. all the other functions try to delegate the calls to the underlying libc function as much as possible.

@ethomson
Copy link
Copy Markdown
Member

/cc @pks-t

Copy link
Copy Markdown
Member

@pks-t pks-t left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Like this, it'd even be possible to swap out e.g. only the stdalloc_realloc function to modify behaviour of both stdalloc_realloc and stdalloc_reallocarray.

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