Alejandro Colomar
d91b22cc2f
lib/, src/: Use stpsep() instead of its pattern
...
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2024-07-08 20:25:01 -05:00
Alejandro Colomar
59e5eef38f
contrib, lib/, src/, tests/: Use stpcpy(3) instead of its pattern
...
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2024-07-03 10:03:12 -05:00
Alejandro Colomar
964df6ed6e
lib/, src/: Use strchrnul(3) instead of its pattern
...
In the files where #include <string.h> is missing, add it, and sort the
includes.
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2024-07-01 21:40:11 -05:00
Alejandro Colomar
22272347b6
lib/string/sprintf/, lib/, src/, tests/: Move all sprintf(3)-like APIs to a subdirectory
...
And have a separate file for each pair of APIs.
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2024-07-01 21:40:11 -05:00
Alejandro Colomar
cf9cc6963c
lib/, src/: Use SNPRINTF() instead of its pattern
...
The variable declarations for the buffers have been aligned in this
commit, so that they appear in the diff, making it easier to review.
Some important but somewhat tangent changes included in this commit:
- lib/nss.c: The size was being defined as 65, but then used as 64.
That was a bug, although not an important one; we were just wasting
one byte. Fix that while we replace snprintf() by SNPRINTF(), which
will get the size from sizeof(), and thus will use the real size.
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2023-12-15 16:41:47 +01:00
Alejandro Colomar
093fb605f9
lib: Merge libmisc into libshadow
...
The separation was unnecessary, and caused build problems. Let's go
wild and obliterate the library. The files are moved to libshadow.
Scripted change:
$ find libmisc/ -type f \
| grep '\.[chy]$' \
| xargs mv -t lib;
Plus updating the Makefile and other references. While at it, I've
sorted the sources lists.
Link: <https://github.com/shadow-maint/shadow/pull/792 >
Reported-by: David Seifert <soap@gentoo.org >
Cc: Sam James <sam@gentoo.org >
Cc: Christian Bricart <christian@bricart.de >
Cc: Michael Vetter <jubalh@iodoru.org >
Cc: Robert Förster <Dessa@gmake.de >
[ soap tested the Gentoo package ]
Tested-by: David Seifert <soap@gentoo.org >
Acked-by: David Seifert <soap@gentoo.org >
Acked-by: Serge Hallyn <serge@hallyn.com >
Acked-by: Iker Pedrosa <ipedrosa@redhat.com >
Acked-by: <lslebodn@fedoraproject.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2023-08-31 08:55:26 +02:00