Skip to content

Commit

Permalink
Reuse pm_buffer_append function in pm_buffer_append_zeroes
Browse files Browse the repository at this point in the history
  • Loading branch information
S-H-GAMELINKS committed May 17, 2024
1 parent 6e526a5 commit d42dcde
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/util/pm_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ pm_buffer_append(pm_buffer_t *buffer, const void *source, size_t length) {
*/
void
pm_buffer_append_zeroes(pm_buffer_t *buffer, size_t length) {
size_t cursor = buffer->length;
if (pm_buffer_append_length(buffer, length)) {
memset(buffer->value + cursor, 0, length);
}
size_t source = 0;
pm_buffer_append(buffer, (const void *) source, length);
}

/**
Expand Down

0 comments on commit d42dcde

Please sign in to comment.