[dpdk-dev] [PATCH 1/8] eal: support dynamic log types

Stephen Hemminger stephen at networkplumber.org
Fri Mar 17 17:17:23 CET 2017


On Fri, 17 Mar 2017 16:51:15 +0100
Olivier Matz <olivier.matz at 6wind.com> wrote:

> +static int
> +__rte_log_register(const char *name, int id)
> +{
> +	char *dup_name = NULL;
> +
> +	dup_name = strdup(name);

Useless initialization!

Many people were taught to always initialize variables. But that was before
compilers were smart enough to catch those errors.


More information about the dev mailing list