Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753526AbZKOTdr (ORCPT ); Sun, 15 Nov 2009 14:33:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753427AbZKOTdq (ORCPT ); Sun, 15 Nov 2009 14:33:46 -0500 Received: from de01.mail.all-tld.net ([195.140.232.8]:50237 "EHLO de01.mail.all-tld.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753327AbZKOTdq convert rfc822-to-8bit (ORCPT ); Sun, 15 Nov 2009 14:33:46 -0500 Date: Sun, 15 Nov 2009 20:33:29 +0100 From: Anders Larsen Subject: Re: [PATCH v5 10/12] string: factorize skip_spaces and export it to be generally available To: =?iso-8859-1?b?QW5kcuk=?= Goddard Rosa Cc: linux list , Andrew Morton References: In-Reply-To: (from andre.goddard@gmail.com on Sun Nov 15 08:15:03 2009) X-Mailer: Balsa 2.3.21 Message-Id: <1258313609l.9645l.0l@oscar.alarsen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: 8BIT X-ALL-TLD-GmbH-Information: AEV Virus and Spam Secure Mail System X-ALL-TLD-GmbH-VirusScanner: Found to be clean X-ALL-TLD-GmbH-SpamCheck: X-MailScanner-From: al@alarsen.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 546 Lines: 18 On 2009-11-15 08:15:03, Andr? Goddard Rosa wrote: > +char *skip_spaces(const char *str) > +{ > + while (isspace(*str)) > + ++str; > + return (char *)str; > +} Is there a good reason why the parameter 'str' is declared 'const' when skip_spaces() returns a non-const pointer into str ? Cheers Anders -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/