justified exit condition

xkbcommon
Alessandro Mauri 5 years ago
parent 922090060f
commit 58aceac802
  1. 1
      macrod.c

@ -256,6 +256,7 @@ int pressBufferRemove (struct pressed_buffer *pb, unsigned short key)
pb->buf[i] = pb->buf[pb->size];
unsigned short *b;
b = realloc(pb->buf, sizeof(unsigned short) * pb->size);
/* if realloc failed but the buffer is populated throw an error */
if (!b && pb->size) {
fprintf(stderr, "realloc failed in pressBufferRemove: %s",
strerror(errno));

Loading…
Cancel
Save