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

[PATCH v2] commit-slab-decl.h: fix define guards

From
Abhishek Kumar <abhishekkumar8222@gmail.com>
Date
May 18, 2020, 14:30 UTC
Message-ID
<20200518143023.14217-1-abhishekkumar8222@gmail.com>
In-Reply-To
<20200516172837.2872-1-abhishekkumar8222@gmail.com>

a9f1f1f9f8 ("commit-slab.h: code split", 2018-05-19) split commit-slab into commit-slab-decl and commit-slab-impl header files. The define guards for commit-slab-decl still use "COMMIT_SLAB_HDR_H". Fortunately, commit-slab-impl introduced its own macro, "COMMIT_SLAB_IMPL_H". Otherwise, the code would have been broken by not including commit-slab-impl.

Let's correct the define guards for commit-slab-decl to match file name.
Signed-off-by: Abhishek Kumar <abhishekkumar8222@gmail.com>
---
 commit-slab-decl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/commit-slab-decl.h b/commit-slab-decl.h
index adc7b46c83..bfbed1516a 100644
--- a/commit-slab-decl.h
+++ b/commit-slab-decl.h
@@ -1,5 +1,5 @@
-#ifndef COMMIT_SLAB_HDR_H
-#define COMMIT_SLAB_HDR_H
+#ifndef COMMIT_SLAB_DECL_H
+#define COMMIT_SLAB_DECL_H
 
 /* allocate ~512kB at once, allowing for malloc overhead */
 #ifndef COMMIT_SLAB_SIZE
@@ -40,4 +40,4 @@ elemtype *slabname## _peek(struct slabname *s, const struct commit *c)
 	declare_commit_slab(slabname, elemtype); \
 	declare_commit_slab_prototypes(slabname, elemtype)
 
-#endif /* COMMIT_SLAB_HDR_H */
+#endif /* COMMIT_SLAB_DECL_H */
-- 
2.26.0
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “commit-slab-decl.h: fix define gaurds”
  1. commit-slab-decl.h: fix define gaurdsAbhishek Kumar, May 16, 2020
  2. Junio C HamanoMay 17, 2020
  3. commit-slab-decl.h: fix define guardsAbhishek Kumar, May 18, 2020
  4. Junio C HamanoMay 18, 2020
  5. Eric SunshineMay 18, 2020
  6. Junio C HamanoMay 18, 2020

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.