diff --git a/absl/synchronization/mutex.cc b/absl/synchronization/mutex.cc index 1e3ca35a..69ef9135 100644 --- a/absl/synchronization/mutex.cc +++ b/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; }