summaryrefslogtreecommitdiff
path: root/absl/synchronization
diff options
context:
space:
mode:
authorGravatar Elijah Conners <business@elijahpepe.com>2022-07-21 13:18:12 -0700
committerGravatar Elijah Conners <business@elijahpepe.com>2022-07-21 13:18:12 -0700
commit0e0d8054dc5b8090668eed5f376d218ff2b50225 (patch)
tree6635df4acb97205ed87fdc5beae13cd4c1c938a4 /absl/synchronization
parent68da198e67ef88a55dfb184b804b91534d9406fc (diff)
fix: properly create the b integer
Signed-off-by: Elijah Conners <business@elijahpepe.com>
Diffstat (limited to 'absl/synchronization')
-rw-r--r--absl/synchronization/mutex.cc2
1 files changed, 1 insertions, 1 deletions
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;
}