Skip to content

Commit 01f6fd4

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7c6eafa commit 01f6fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
445445
* at least 'nr' entries; the number of entries currently allocated
446446
* is 'alloc', using the standard growing factor alloc_nr() macro.
447447
*
448-
* DO NOT USE any expression with side-effect for 'x' or 'alloc'.
448+
* DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'.
449449
*/
450450
#define ALLOC_GROW(x, nr, alloc) \
451451
do { \

0 commit comments

Comments
 (0)