mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anders Larsen <al@alarsen.net>
To: "André Goddard Rosa" <andre.goddard@gmail.com>
Cc: linux list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v5 10/12] string: factorize skip_spaces and export it to be generally available
Date: Sun, 15 Nov 2009 20:33:29 +0100	[thread overview]
Message-ID: <1258313609l.9645l.0l@oscar.alarsen.net> (raw)
In-Reply-To: <b6353c59eca999d76c7951f24aae6eb890eb510b.1258181837.git.andre.goddard@gmail.com> (from andre.goddard@gmail.com on Sun Nov 15 08:15:03 2009)

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

  reply	other threads:[~2009-11-15 19:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14  7:11 [PATCH v5 00/12] introduce skip_spaces(), reducing code size plus some clean-ups André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 01/12] vsprintf: factorize "(null)" string André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 02/12] vsprintf: pre-calculate final string length for later use André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 03/12] vsprintf: give it some care to please checkpatch.pl André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 04/12] vsprintf: use TOLOWER whenever possible André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 05/12] vsprintf: reduce code size by avoiding extra check André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 06/12] vsprintf: move local vars to block local vars and remove unneeded ones André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 07/12] vsprintf: factor out skip_space code in a separate function André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 08/12] vsprintf: reuse almost identical simple_strtoulX() functions André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 09/12] ctype: constify read-only _ctype string André Goddard Rosa
2009-11-14  7:11 ` [PATCH v5 10/12] string: factorize skip_spaces and export it to be generally available André Goddard Rosa
2009-11-15 19:33   ` Anders Larsen [this message]
2009-11-14  7:11 ` [PATCH v5 11/12] string: on strstrip(), first remove leading spaces before running over str André Goddard Rosa
2009-11-14  7:12 ` [PATCH v5 12/12] tree-wide: convert open calls to remove spaces to skip_spaces() lib function André Goddard Rosa
2009-11-16 15:02   ` Henrique de Moraes Holschuh
     [not found] <20091115200215.GA25351@machine>
2009-11-15 21:51 ` [PATCH v5 10/12] string: factorize skip_spaces and export it to be generally available Anders Larsen
2009-11-16 12:21   ` André Goddard Rosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1258313609l.9645l.0l@oscar.alarsen.net \
    --to=al@alarsen.net \
    --cc=akpm@linux-foundation.org \
    --cc=andre.goddard@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®