]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/string/README: Document *_a() macros
authorAlejandro Colomar <alx@kernel.org>
Fri, 31 Oct 2025 10:07:32 +0000 (11:07 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 28 Nov 2025 02:50:48 +0000 (20:50 -0600)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/string/README

index 8072e85f7fddd35941e13422e24bb6495f59574f..25e2cdf10ccc62ea45d98f2662a47254b2d38b49 100644 (file)
@@ -4,6 +4,9 @@ General guidelines:
 -  If there's an upper-case macro that wraps a function, use the macro
    if possible.  These use macro magic to add safety.
 
+-  If there's a *_a() macro that wraps an API, use the macro if
+   possible.  These use countof() to add bounds safety.
+
 -  x*() functions wrap a function of the same name without the 'x'.
    These wrappers exit on error instead of returning NULL.
    They simplify program code.  Avoid them in library code.