It's not being used anymore. We got rid of it in favor of better APIs.
Well, it's still being used in one place: a contrib/ patch, but I
explicitly want to break it, so that someone reviews it. I don't want
to modify it, since it's not being tested, so it would be very risky for
me to touch it. Instead, let it bitrot, and if someone cares, they'll
update it correctly.
BTW, the comment that said /* danger -side effects */ was wrong:
sizeof() doesn't evaluate the argument (unless it's a VLA), so there
wasn't really a double-evaluation issue.
Cc: Christian Göttsche <cgzones@googlemail.com>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
#define SCALE DAY
#endif
-/* Copy string pointed by B to array A with size checking. It was originally
- in lmain.c but is _very_ useful elsewhere. Some setuid root programs with
- very sloppy coding used to assume that BUFSIZ will always be enough... */
-
- /* danger - side effects */
-#define STRFCPY(A,B) \
- (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
-
#ifndef PASSWD_FILE
#define PASSWD_FILE "/etc/passwd"
#endif