lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130724.160118.1940783900135820589.davem@davemloft.net>
Date:	Wed, 24 Jul 2013 16:01:18 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jiri@...nulli.us
Cc:	netdev@...r.kernel.org, stephen@...workplumber.org,
	Narendra_K@...l.com, bhutchings@...arflare.com,
	john.r.fastabend@...el.com, or.gerlitz@...il.com
Subject: Re: [patch net-next v3 3/3] net: export physical port id via sysfs

From: Jiri Pirko <jiri@...nulli.us>
Date: Mon, 22 Jul 2013 15:05:17 +0200

> +static size_t _format_port_id(char *buf, int buflen,
> +			      const unsigned char *id, int len)
> +{
> +	int i;
> +	char *cp = buf;
> +
> +	for (i = 0; i < len; i++)
> +		cp += scnprintf(cp, buflen - (cp - buf), "%02x", id[i]);
> +	return cp - buf;
> +}

This is "%phN", please use the printf strings we have support for
in the kernel instead of reimplementing them :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ