[dpdk-dev] [PATCH v3 01/24] lib/librte_eal: import libbsd strlcpy

Thomas Monjalon thomas at monjalon.net
Sun May 13 16:56:19 CEST 2018


Hi,

12/05/2018 03:58, Andy Green:
> Signed-off-by: Andy Green <andy at warmcat.com>

Why do we need to replace rte_strlcpy fallback?
GCC 8 complains about the fallback using snprintf?


> +/*
> + * Copyright (c) 1998 Todd C. Miller <Todd.Miller at courtesan.com>
> + *
> + * Permission to use, copy, modify, and distribute this software for any
> + * purpose with or without fee is hereby granted, provided that the above
> + * copyright notice and this permission notice appear in all copies.
> + */
> +
> +size_t
> +rte_strlcpy(char *dst, const char *src, size_t siz)
> +{
[...]
> +}

I would like to be sure there is no legal issue with this imported code.


[...]
> -static inline size_t
> -rte_strlcpy(char *dst, const char *src, size_t size)
> -{
> -	return snprintf(dst, size, "%s", src);
> -}
> +size_t
> +rte_strlcpy(char *dst, const char *src, size_t size);





More information about the dev mailing list