-
Notifications
You must be signed in to change notification settings - Fork 222
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
base: master
Are you sure you want to change the base?
Commits on May 27, 2024
-
lib/typetraits.h: Add macros that give information about a type
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 <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for d06c81f - Browse repository at this point
Copy the full SHA d06c81fView commit details -
src/: Use str2[u]l() instead of atoi(3)
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 <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for b8e914f - Browse repository at this point
Copy the full SHA b8e914fView commit details -
lib/get_gid.c: get_gid(): Reimplement in terms of a2i()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 105697f - Browse repository at this point
Copy the full SHA 105697fView commit details -
lib/, libsubid/, po/, src/: get_gid(): Move function to "atoi/getnum.h"
Implement it as an inline function, and add restrict and ATTR_STRING() and ATTR_ACCESS() as appropriate. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 36db6c5 - Browse repository at this point
Copy the full SHA 36db6c5View commit details -
lib/: Don't open-code get_gid()
These functions were open-coding get_gid(). Use the actual function. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 310b3d8 - Browse repository at this point
Copy the full SHA 310b3d8View commit details -
lib/get_pid.c: get_pid(): Reimplement in terms of a2i()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 7b9fe7a - Browse repository at this point
Copy the full SHA 7b9fe7aView commit details -
lib/: get_pid(): Move function to "atoi/getnum.h"
Implement it as an inline function, and add restrict and ATTR_STRING() and ATTR_ACCESS() as appropriate. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 7914f14 - Browse repository at this point
Copy the full SHA 7914f14View commit details -
lib/atoi/getnum.[ch]: get_fd(): Add function for parsing a file descr…
…iptor from a string Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 7d00e66 - Browse repository at this point
Copy the full SHA 7d00e66View commit details -
lib/get_pid.c: get_pidfd_from_fd(): Don't open-code get_fd()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 044396c - Browse repository at this point
Copy the full SHA 044396cView commit details -
src/usermod.c: getulong_range(): Reimplement in terms of a2ul()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 0a81ae8 - Browse repository at this point
Copy the full SHA 0a81ae8View commit details -
lib/get_uid.c: get_uid(): Reimplement in terms of a2i()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for d9e31c7 - Browse repository at this point
Copy the full SHA d9e31c7View commit details -
lib/, po/, src/: get_uid(): Move function to "atoi/getnum.h"
Implement it as an inline function, and add restrict and ATTR_STRING() and ATTR_ACCESS() as appropriate. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 5332860 - Browse repository at this point
Copy the full SHA 5332860View commit details -
lib/limits.c: setrlimit_value(): Reimplement in terms of a2i()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 4d4b471 - Browse repository at this point
Copy the full SHA 4d4b471View commit details -
src/usermod.c: Fix const correctness
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 <alx@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for b85ad7a - Browse repository at this point
Copy the full SHA b85ad7aView commit details