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

[PATCH 3/5] khash.h: Spell the null pointer as NULL

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 7, 2013, 22:09 UTC
Message-ID
<527C0FA7.3000306@ramsay1.demon.co.uk>
Noticed by sparse. ("Using plain integer as NULL pointer")
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 khash.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/khash.h b/khash.h
index 0fdf39d..c4c1613 100644
--- a/khash.h
+++ b/khash.h
@@ -114,7 +114,7 @@ static const double __ac_HASH_UPPER = 0.77;
 	}																	\
 	SCOPE int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \
 	{ /* This function uses 0.25*n_buckets bytes of working space instead of [sizeof(key_t+val_t)+.25]*n_buckets. */ \
-		khint32_t *new_flags = 0;										\
+		khint32_t *new_flags = NULL;										\
 		khint_t j = 1;													\
 		{																\
 			kroundup32(new_n_buckets); 									\
-- 
1.8.4
Message 1 of 1 in “khash.h: Spell the null pointer as NULL”
  1. 3/5 khash.h: Spell the null pointer as NULLRamsay Jones, Nov 7, 2013

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.