From: Thomas Weißschuh Date: Wed, 27 Sep 2023 20:04:40 +0000 (+0200) Subject: lib/colors: correct documentation of colors_add_scheme() X-Git-Tag: v2.40-rc1~222^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99d30f02f789ba897723fbdf46d599689c9aa90c;p=thirdparty%2Futil-linux.git lib/colors: correct documentation of colors_add_scheme() The function does not take ownership of its arguments and it does not require those arguments to be heap-allocated. In fact there is only one caller and it passed stack-allocated values. Signed-off-by: Thomas Weißschuh --- diff --git a/lib/colors.c b/lib/colors.c index 2d4ba2fdba..0928770a3b 100644 --- a/lib/colors.c +++ b/lib/colors.c @@ -357,12 +357,10 @@ static char *colors_get_homedir(char *buf, size_t bufsz) /* * Adds one color sequence to array with color scheme. - * When returning success (0) this function takes ownership of - * @seq and @name, which have to be allocated strings. */ static int colors_add_scheme(struct ul_color_ctl *cc, - char *name, - char *seq0) + const char *name, + const char *seq0) { struct ul_color_scheme *cs = NULL; char *seq = NULL;