[U-Boot] [PATCH 03/30] net: new utility functions for working with enetaddr's

Mike Frysinger vapier at gentoo.org
Tue Feb 17 22:53:26 CET 2009


On Tuesday 17 February 2009 00:10:24 Mike Frysinger wrote:
> +int eth_getenv_enetaddr(char *name, uchar *enetaddr)
> +{
> +	int ret = 0;
> +	char *addr;
> +
> +	addr = getenv(name);
> +	if (!addr)
> +		ret = -1;
> +	eth_parse_enetaddr(addr, enetaddr);
> +
> +	return ret;
> +}

the return value isnt shaping up the way i expected in most every other place.  
i'll change it to read:
return is_valid_ether_addr(enetaddr);

that way it'll behave as expected: 0->failure, 1->success
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090217/1ef60025/attachment.pgp 


More information about the U-Boot mailing list