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

[RFC][PATCH 02/10] Sparse: fix some "using integer as NULL pointer" warnings

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jun 8, 2007, 22:10 UTC
Message-ID
<4669D3EC.3030501@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 daemon.c     |   12 ++++++------
 fetch-pack.c |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/daemon.c b/daemon.c
index e74ecac..b79e905 100644
--- a/daemon.c
+++ b/daemon.c
@@ -60,12 +60,12 @@ static unsigned int init_timeout;
 #define INTERP_SLOT_PERCENT	(5)
 
 static struct interp interp_table[] = {
-	{ "%H", 0},
-	{ "%CH", 0},
-	{ "%IP", 0},
-	{ "%P", 0},
-	{ "%D", 0},
-	{ "%%", 0},
+	{ "%H" },
+	{ "%CH" },
+	{ "%IP" },
+	{ "%P" },
+	{ "%D" },
+	{ "%%" },
 };
 
 
diff --git a/fetch-pack.c b/fetch-pack.c
index 06f4aec..75649a6 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -642,7 +642,7 @@ static int remove_duplicates(int nr_heads, char **heads)
 			heads[dst] = heads[src];
 		dst++;
 	}
-	heads[dst] = 0;
+	heads[dst] = NULL;
 	return dst;
 }
 
-- 
1.5.2
Message 1 of 1 in “Sparse: fix some "using integer as NULL pointer" warnings”
  1. Ramsay JonesJun 8, 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.