From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15210 invoked by alias); 21 Mar 2006 15:30:17 -0000 Received: (qmail 15201 invoked by uid 22791); 21 Mar 2006 15:30:16 -0000 X-Spam-Check-By: sourceware.org Received: from ns2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 21 Mar 2006 15:30:16 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 65ACE1D102; Tue, 21 Mar 2006 16:30:13 +0100 (CET) From: Andreas Schwab To: Denis PILAT Cc: Chet Ramey , Eli Zaretskii , gdb-patches@sources.redhat.com, bash-maintainers@gnu.org Subject: Re: [patch-readline] history file reading References: <44196BC6.4050503@st.com> <441FD3C7.1090504@st.com> <44201202.3010001@case.edu> <44196BC6.4050503@st.com> <441FD3C7.1090504@st.com> <20060321145842.GA25689@nevyn.them.org> X-Yow: A shapely CATHOLIC SCHOOLGIRL is FIDGETING inside my costume.. Date: Tue, 21 Mar 2006 16:29:00 -0000 In-Reply-To: <20060321145842.GA25689@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 21 Mar 2006 09:58:42 -0500") Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00243.txt.bz2 Daniel Jacobowitz writes: >> + if ( line_end - 1 >= line_start && *( line_end - 1 ) =='\r' ) >> + *( line_end - 1 ) = '\0'; > > And you don't need the spaces inside the parentheses, but do usually > need spaces around operators: > > if (line_end - 1 >= line_start && *(line_end - 1) == '\r') > *(line_end - 1) = '\0'; line_end[-1] whould be much better readable, IMHO. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."