From: Mike Frysinger Date: Fri, 7 Oct 2011 13:16:24 -0400 Subject: [U-Boot] [PATCH] mvgbe: fix network device indices In-Reply-To: <1317939802-19695-1-git-send-email-michael@walle.cc> References: <1317939802-19695-1-git-send-email-michael@walle.cc> Message-ID: <201110071316.25219.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 06 October 2011 18:23:22 Michael Walle wrote: > --- a/net/eth.c > +++ b/net/eth.c > > +int eth_setenv_enetaddr_by_index(const char *base_name, int index, > + const uchar *enetaddr) > +{ > + char enetvar[32]; > + sprintf(enetvar, index ? "%s%daddr" : "%saddr", base_name, index); > + return eth_setenv_enetaddr(enetvar, enetaddr); > +} please unify the duplicate logic coming from eth_getenv_enetaddr_by_index in a new local static function -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111007/9420fe8d/attachment.pgp