aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-10-08 11:46:59 -0500
committerJunio C Hamano <gitster@pobox.com>2010-10-08 13:17:10 -0700
commit01f6fd4b4e59bc131941d917138cdd2cc6662382 (patch)
treec97eb430969d415ed92e3abe929facadacfa5528 /cache.h
parent7c6eafa35af805578990e76b691ff7f1a25a3c57 (diff)
downloadgit-01f6fd4b4e59bc131941d917138cdd2cc6662382.tar.gz
git-01f6fd4b4e59bc131941d917138cdd2cc6662382.tar.xz
Documentation: No argument of ALLOC_GROW should have side-effects
The explanatory comment before the definition of ALLOC_GROW carefully lists arguments that will be used more than once and thus cannot have side-effects; a lazy reader might conclude that the arguments not listed are used only once and side effects safe. Correct it to list all three arguments, avoiding this confusion. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 3d5ed5198..33decd942 100644
--- a/cache.h
+++ b/cache.h
@@ -445,7 +445,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
* at least 'nr' entries; the number of entries currently allocated
* is 'alloc', using the standard growing factor alloc_nr() macro.
*
- * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
+ * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'.
*/
#define ALLOC_GROW(x, nr, alloc) \
do { \