From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
Subject: Re: [PATCH 01/02] ident.c: Use const qualifier when possible
Date: Sun, 15 Apr 2007 21:06:49 +0100 [thread overview]
Message-ID: <200704152106.51082.andyparkins@gmail.com> (raw)
In-Reply-To: <20070415155110.365070d8@gnut>
On Sunday 2007, April 15, Luiz Fernando N. Capitulino wrote:
> -static const char *env_hint =
> +static const char const *env_hint =
char c; // c is a char
char *p; // p is a pointer, *p is a char
const char c; // c is a const char [1]
char const c; // c is a const char [1]
const char *p; // p is a pointer, *p is a const char [2]
char const *p; // p is a pointer, *p is a const char [2]
char *const p; // p is a const-pointer, *p is a char
const char *const p; // p is a const-pointer, *p is a const-char
[1] Semantically identical
[2] Semantically identical
You can see then that
const char const *env_hint
is redundant, it's simply saying twice that (*env_hint) is const.
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next prev parent reply other threads:[~2007-04-15 20:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-15 18:51 [PATCH 01/02] ident.c: Use const qualifier when possible Luiz Fernando N. Capitulino
2007-04-15 20:06 ` Andy Parkins [this message]
2007-04-15 20:14 ` Junio C Hamano
2007-04-15 21:40 ` Luiz Fernando N. Capitulino
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=200704152106.51082.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
--cc=lcapitulino@mandriva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.