-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using
sizeof('\0')
to compute size for NUL-terminator.
The expression `sizeof('\0')` evaluates to `sizeof(int)`, which does not reflect the intent in the code. It has been replaced with `1 /* NUL */` for clarity. This issue was originally reported by наб <[email protected]> who also proposed this patch.
- Loading branch information
Filip Strömbäck
committed
Dec 19, 2023
1 parent
e2f9497
commit cb9241b
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters