From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6825 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Network error strings Date: Mon, 12 Jan 2015 00:48:47 -0500 Message-ID: <20150112054847.GI4574@brightrain.aerifal.cx> References: <54B35766.4030902@nicta.com.au> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1421041748 21527 80.91.229.3 (12 Jan 2015 05:49:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2015 05:49:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6838-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jan 12 06:49:03 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YAXs6-0006Pm-Kd for gllmg-musl@m.gmane.org; Mon, 12 Jan 2015 06:49:02 +0100 Original-Received: (qmail 1866 invoked by uid 550); 12 Jan 2015 05:48:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1849 invoked from network); 12 Jan 2015 05:48:58 -0000 Content-Disposition: inline In-Reply-To: <54B35766.4030902@nicta.com.au> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6825 Archived-At: 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