]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
*/: s/STRNCAT/strncat_a/
authorAlejandro Colomar <alx@kernel.org>
Tue, 14 Oct 2025 10:50:42 +0000 (12:50 +0200)
committerSerge Hallyn <serge@hallyn.com>
Fri, 28 Nov 2025 02:50:48 +0000 (20:50 -0600)
This name better reflects that it handles arrays, and doesn't shout.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/string/README
lib/string/strcpy/strncat.h
src/logoutd.c

index 37eb4f1d72105fcf15827624cd68cf8f29a9bc4d..1123206b7e587e9ccbcb90eca26a77ac8b81b8f7 100644 (file)
@@ -177,7 +177,7 @@ strcpy/ - String copying
     STRNCPYTAIL()
        Like strncpytail, but takes an array.
 
-    STRNCAT()  // To be removed
+    strncat_a()  // To be removed
        Do NOT use.  I'll remove it soon.
 
   s/
index 15911684ca679169df7c5020bded7ef4ec3308b3..754b6450c7e06c5eec524f54927f0abc85225080 100644 (file)
@@ -13,7 +13,8 @@
 #include "sizeof.h"
 
 
-#define STRNCAT(dst, src)  strncat(dst, src, countof(src))
+// strncat_a - nonstring catenate-into-string array
+#define strncat_a(dst, src)  strncat(dst, src, countof(src))
 
 
 #endif  // include guard
index 2d4ec173716d0616621353c46c23258ae060103f..8e03f65a997d13a65b39cbe5f0c7987e9dba49a5 100644 (file)
@@ -207,7 +207,7 @@ main(int argc, char **argv)
                        else
                                strcpy(tty_name, "");
 
-                       STRNCAT(tty_name, ut->ut_line);
+                       strncat_a(tty_name, ut->ut_line);
 #ifndef O_NOCTTY
 #define O_NOCTTY 0
 #endif