git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 01/02] ident.c: Use const qualifier when possible

From
LCLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Date
Apr 15, 2007, 18:51 UTC
Message-ID
<20070415155110.365070d8@gnut>
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
---
 ident.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ident.c b/ident.c
index bb03bdd..454aace 100644
--- a/ident.c
+++ b/ident.c
@@ -9,7 +9,7 @@
 
 static char git_default_date[50];
 
-static void copy_gecos(struct passwd *w, char *name, int sz)
+static void copy_gecos(const struct passwd *w, char *name, int sz)
 {
 	char *src, *dst;
 	int len, nlen;
@@ -43,7 +43,7 @@ static void copy_gecos(struct passwd *w, char *name, int sz)
 
 }
 
-static void copy_email(struct passwd *pw)
+static void copy_email(const struct passwd *pw)
 {
 	/*
 	 * Make up a fake email address
@@ -172,7 +172,7 @@ static int copy(char *buf, int size, int offset, const char *src)
 
 static const char au_env[] = "GIT_AUTHOR_NAME";
 static const char co_env[] = "GIT_COMMITTER_NAME";
-static const char *env_hint =
+static const char const *env_hint =
 "\n"
 "*** Your name cannot be determined from your system services (gecos).\n"
 "\n"
-- 
1.5.1.1.86.gfd56-dirty
Next: Andy Parkins
Message 1 of 4 in “ident.c: Use const qualifier when possible”
  1. 01/02 ident.c: Use const qualifier when possibleLuiz Fernando N. Capitulino, Apr 15, 2007
  2. Andy ParkinsApr 15, 2007
  3. Junio C HamanoApr 15, 2007
  4. Luiz Fernando N. CapitulinoApr 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.