Skip to content

Commit

Permalink
Fix atomic_fetch_sub on workers (#1331)
Browse files Browse the repository at this point in the history
clangd was showing a diagnostic for this line.
  • Loading branch information
mrdomino authored Nov 30, 2024
1 parent cf9252f commit 3142758
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tool/net/redbean.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ static void CallSimpleHookIfDefined(const char *s) {

static void ReportWorkerExit(int pid, int ws) {
int workers;
workers = atomic_fetch_sub(&shared->workers, 1) - 1;
workers = atomic_fetch_sub((_Atomic(int) *)&shared->workers, 1) - 1;
if (WIFEXITED(ws)) {
if (WEXITSTATUS(ws)) {
LockInc(&shared->c.failedchildren);
Expand Down

0 comments on commit 3142758

Please sign in to comment.