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
| ||
|
Message-ID: <20091117164633.49e5fa44@nehalam> Date: Tue, 17 Nov 2009 16:46:33 -0800 From: Stephen Hemminger <shemminger@...tta.com> To: Octavian Purdila <opurdila@...acom.com> Cc: netdev@...r.kernel.org Subject: Re: [net-next-2.6 PATCH] net: device name allocation cleanups On Tue, 17 Nov 2009 22:33:53 +0200 Octavian Purdila <opurdila@...acom.com> wrote: > + if (fmt) { > + if (strchr(name, '%')) > + return __dev_alloc_name(net, name, buf); > + } > + > + if (__dev_get_by_name(net, name)) Flatten this logic out. if (fmt && strchr(name, '%')) return __dev_alloc_name(net, name, buf); else if (__dev_get_by_name(net, name)) return -EEXIST; else if (buf != name) strlcpy(buf, name, IFNAMSIZ); return 0; -- 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