Browse Source

[buffer] fix duplicate assert and comment

this originates from ad3e93ea9 for no apparent reason
personal/stbuehler/fix-fdevent
Stefan Bühler 4 years ago
parent
commit
e0260a411d
  1. 4
      src/buffer.c

4
src/buffer.c

@ -131,10 +131,8 @@ char* buffer_string_prepare_append(buffer *b, size_t size) {
if (buffer_string_is_empty(b)) {
return buffer_string_prepare_copy(b, size);
} else {
size_t req_size = b->used + size;
/* not empty, b->used already includes a terminating 0 */
force_assert(req_size >= b->used);
size_t req_size = b->used + size;
/* check for overflow: unsigned overflow is defined to wrap around */
force_assert(req_size >= b->used);

Loading…
Cancel
Save