lib/string/zustr2stp.[ch]: Remove zustr2stp(); keep ZUSTR2STP()
The function should never be used; it's always used via its wrapper macro. To simplify, and reduce chances of confusion: remove the function, and implement the macro directly in terms of stpcpy(mempcpy(strnlen())). Update the documentation, and improve the example, which was rather confusing. Cc: "Serge E. Hallyn" <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
ba43b49a52
commit
ffb3992467
+2
-12
@@ -1,17 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023, Alejandro Colomar <alx@kernel.org>
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar <alx@kernel.org>
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ident "$Id$"
|
||||
|
||||
#include "string/zustr2stp.h"
|
||||
|
||||
|
||||
extern inline char *zustr2stp(char *restrict dst, const char *restrict src,
|
||||
size_t sz);
|
||||
|
||||
Reference in New Issue
Block a user