Skip to content

Commit 3142758

Browse files
authored
Fix atomic_fetch_sub on workers (#1331)
clangd was showing a diagnostic for this line.
1 parent cf9252f commit 3142758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tool/net/redbean.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ static void CallSimpleHookIfDefined(const char *s) {
13511351

13521352
static void ReportWorkerExit(int pid, int ws) {
13531353
int workers;
1354-
workers = atomic_fetch_sub(&shared->workers, 1) - 1;
1354+
workers = atomic_fetch_sub((_Atomic(int) *)&shared->workers, 1) - 1;
13551355
if (WIFEXITED(ws)) {
13561356
if (WEXITSTATUS(ws)) {
13571357
LockInc(&shared->c.failedchildren);

0 commit comments

Comments
 (0)