From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp125.ord1c.emailsrvr.com ([108.166.43.125]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1df714-0001C8-8R for barebox@lists.infradead.org; Tue, 08 Aug 2017 16:06:00 +0000 References: <20170807221042.19700-1-gael.portay@savoirfairelinux.com> <20170807221042.19700-2-gael.portay@savoirfairelinux.com> <1502178714.2934.21.camel@pengutronix.de> <20170808152049.njl24tcwafccebwt@gportay> <1502206574.2934.93.camel@pengutronix.de> From: Ian Abbott Message-ID: Date: Tue, 8 Aug 2017 17:05:35 +0100 MIME-Version: 1.0 In-Reply-To: <1502206574.2934.93.camel@pengutronix.de> Content-Language: en-GB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 1/2] readline_simple: return -1 if getc fails To: Lucas Stach , =?UTF-8?Q?Ga=c3=abl_PORTAY?= Cc: barebox@lists.infradead.org T24gMDgvMDgvMTcgMTY6MzYsIEx1Y2FzIFN0YWNoIHdyb3RlOgo+IEFtIERpZW5zdGFnLCBkZW4g MDguMDguMjAxNywgMTE6MjAgLTA0MDAgc2NocmllYiBHYcOrbCBQT1JUQVk6Cj4+IEhpIEx1Y2Fz LAo+Pgo+PiBPbiBUdWUsIEF1ZyAwOCwgMjAxNyBhdCAwOTo1MTo1NEFNICswMjAwLCBMdWNhcyBT dGFjaCB3cm90ZToKPj4+IEFtIE1vbnRhZywgZGVuIDA3LjA4LjIwMTcsIDE4OjEwIC0wNDAwIHNj aHJpZWIgR2HDq2wgUE9SVEFZOgo+Pj4+IFRoZSBnZXRjIGZ1bmN0aW9uIG1heSByZXR1cm4gYW4g ZXJybm8gY29kZSBpZiBhbiBlcnJvciBoYXBwZW5zLgo+Pj4+Cj4+Pj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