-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expunge strtoll(3) and strtol(3) #896
Open
alejandro-colomar
wants to merge
14
commits into
shadow-maint:master
Choose a base branch
from
alejandro-colomar:strtoll
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
alejandro-colomar
force-pushed
the
strtoll
branch
14 times, most recently
from
January 16, 2024 13:51
69b1fca
to
ff5452a
Compare
alejandro-colomar
force-pushed
the
strtoll
branch
4 times, most recently
from
January 21, 2024 00:40
2a6b341
to
5e9fdf4
Compare
alejandro-colomar
force-pushed
the
strtoll
branch
from
January 29, 2024 15:19
5e9fdf4
to
828ea1f
Compare
alejandro-colomar
force-pushed
the
strtoll
branch
from
February 6, 2024 01:20
828ea1f
to
c756605
Compare
alejandro-colomar
force-pushed
the
strtoll
branch
2 times, most recently
from
February 20, 2024 00:08
a73bd21
to
05152cc
Compare
alejandro-colomar
force-pushed
the
strtoll
branch
3 times, most recently
from
March 15, 2024 00:55
68ba703
to
a0b322e
Compare
v2 changes:
|
alejandro-colomar
force-pushed
the
strtoll
branch
from
March 21, 2024 14:28
a0b322e
to
97d5ce5
Compare
v2b changes:
|
alejandro-colomar
force-pushed
the
strtoll
branch
from
March 23, 2024 23:29
97d5ce5
to
0247134
Compare
v2c changes:
|
alejandro-colomar
force-pushed
the
strtoll
branch
from
March 29, 2024 19:38
0247134
to
ae1fd8a
Compare
v2d changes:
|
alejandro-colomar
force-pushed
the
strtoll
branch
from
April 16, 2024 01:55
ae1fd8a
to
1125c9a
Compare
v2e changes:
|
alejandro-colomar
force-pushed
the
strtoll
branch
from
April 16, 2024 13:49
1125c9a
to
17194b3
Compare
v2f changes:
|
It seems the const-generic macros have exposed some const correctness violations. They are probably nothing to worry, but I'll fix them. Edit: Done. |
alejandro-colomar
force-pushed
the
strtoll
branch
from
May 17, 2024 13:53
cff5535
to
86734ea
Compare
In the case of is_unsigned() and is_signed(), the natural thing would be to compare to 0: #define is_unsigned(x) (((typeof(x)) -1) > 0) #define is_signed(x) (((typeof(x)) -1) < 0) However, that would trigger -Wtype-limits, so we compare against 1, which silences that, and does the same job. Signed-off-by: Alejandro Colomar <[email protected]>
atoi(3) easily triggers Undefined Behavior. Replace it by str2[u]l(), which are safe from that, and add type safety too. Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Implement it as an inline function, and add restrict and ATTR_STRING() and ATTR_ACCESS() as appropriate. Signed-off-by: Alejandro Colomar <[email protected]>
These functions were open-coding get_gid(). Use the actual function. Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Implement it as an inline function, and add restrict and ATTR_STRING() and ATTR_ACCESS() as appropriate. Signed-off-by: Alejandro Colomar <[email protected]>
…iptor from a string Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Implement it as an inline function, and add restrict and ATTR_STRING() and ATTR_ACCESS() as appropriate. Signed-off-by: Alejandro Colomar <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Now that we use liba2i's const-generic macros, we can (and must) use a 'const char **' endp where the input string is 'const char *'. Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar
force-pushed
the
strtoll
branch
from
May 27, 2024 16:20
86734ea
to
b85ad7a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove all calls to strtoll(3) and strtol(3), and replace them by safer calls like getlong() or getnum().
Revisions
v3
v3 changes:v4
v4 changes:v4b
v4c