This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ether_ntoa() output format


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]