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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVxJT-TXBd5S+HNfzNR2hnGUk2hMfTSQrkodUunUXOQ6+X8eg@mail.gmail.com>
Date:	Wed, 13 Jul 2011 13:09:03 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Arend van Spriel <arend@...adcom.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: change return values in mac_pton() function

On Wed, Jul 13, 2011 at 12:30 PM, Arend van Spriel <arend@...adcom.com> wrote:
> The original commit adding this function noted a diverge from usual
> 0=success/-E=fail, but no motivation for it.

I thought it was obvious, but indeed wasn't explicitely
mentioned in changelog. But see inet_pton(3).

> To stay consistent this
> commit adheres to the usual approach. The callers check for result
> is changed from 'if(!mac_pton(x, y))' to 'if(mac_pton(x,y) < 0)'.

> @@ -304,20 +304,20 @@ int mac_pton(const char *s, u8 *mac)
>
>        /* XX:XX:XX:XX:XX:XX */
>        if (strlen(s) < 3 * ETH_ALEN - 1)
> -               return 0;
> +               return -EINVAL;
--
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