This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix ether_ntoa() output format
- From: Mathieu Lacage <mathieu dot lacage at sophia dot inria dot fr>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Nikita Izyumtsev <nikita dot izyumtsev at gmail dot com>, libc-alpha at sources dot redhat dot com
- Date: Sun, 01 Aug 2010 11:41:26 +0200
- Subject: Re: [PATCH] Fix ether_ntoa() output format
- References: <op.vggmcoovgweiyn@localhost.localdomain> <4C5190C2.7020801@redhat.com>
On Thu, 2010-07-29 at 07:31 -0700, Ulrich Drepper wrote:
> > I have bumped into issue in ether_ntoa() implementation.
> > All leading zeros were suppressed.
> > e.g instead of 00:01:13:25:18:fa
> > 0:1:13:25:18:fa is printed.
>
> And the problem is? This is perfectly valid for all I know. You cannot
> just claim there is a problem without backing this up.
As you point out, the current behavior (remove leading zeros) is correct
and valid but could be made more helpful by generating a fixed-size
string because this makes it easier for the users of this function to
generate a nice-looking output. Of course, this is subjective, but I
fail to see how the current behavior could be judged more useful than
the proposed behavior according to any metric.
Mathieu