mailing list of musl libc
 help / color / mirror / code / Atom feed
* Network error strings
@ 2015-01-12  5:11 Matthew Fernandez
  2015-01-12  5:48 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Fernandez @ 2015-01-12  5:11 UTC (permalink / raw)
  To: musl

Hi all,

In the file src/network/gai_strerror.c all error messages are terminated with an explicit NUL byte,
except the last that has a NUL byte preceding it. Is this correct? I don't have a deep understanding
of this code, so apologies if this is intentional. It just jumped out at me today as unusual.

Thanks,
Matt

________________________________

The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Network error strings
  2015-01-12  5:11 Network error strings Matthew Fernandez
@ 2015-01-12  5:48 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2015-01-12  5:48 UTC (permalink / raw)
  To: musl

On Mon, Jan 12, 2015 at 04:11:02PM +1100, Matthew Fernandez wrote:
> Hi all,
> 
> In the file src/network/gai_strerror.c all error messages are terminated with an explicit NUL byte,
> except the last that has a NUL byte preceding it. Is this correct? I don't have a deep understanding
> of this code, so apologies if this is intentional. It just jumped out at me today as unusual.

Yes, it's intentional and it's simply how the advance/stop logic
works in the tiny loop in the actual code.

Rich


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-12  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12  5:11 Network error strings Matthew Fernandez
2015-01-12  5:48 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).