Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/c.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void __str_base10(char *pb, int val)
i--;
}

if (neg == 1)
if (neg)
pb[i] = '-';
}

Expand Down Expand Up @@ -692,7 +692,7 @@ void *calloc(int n, int size)
/* Check for overflow before multiplication */
if (!n || !size)
return NULL;
if (size != 0 && n > INT_MAX / size)
if (n > INT_MAX / size)
return NULL; /* Overflow protection */

int total = n * size;
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/fib-arm.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/snapshots/fib-riscv.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/snapshots/hello-arm.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/snapshots/hello-riscv.json

Large diffs are not rendered by default.