fix: properly create the b integer

Signed-off-by: Elijah Conners <business@elijahpepe.com>
pull/1223/head
Elijah Conners 2 years ago
parent 68da198e67
commit 0e0d8054dc
No known key found for this signature in database
GPG Key ID: 9A0C791631E32890
  1. 2
      absl/synchronization/mutex.cc

@ -430,7 +430,7 @@ static void PostSynchEvent(void *obj, int ev) {
char buffer[ABSL_ARRAYSIZE(pcs) * 24];
int pos = snprintf(buffer, sizeof (buffer), " @");
for (int i = 0; i != n; i++) {
int b += snprintf(&buffer[pos], sizeof (buffer) - pos, " %p", pcs[i]);
int b = snprintf(&buffer[pos], sizeof (buffer) - pos, " %p", pcs[i]);
if (b < 0 || b >= sizeof (buffer) - pos) {
break;
}

Loading…
Cancel
Save