about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/book/macros.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/doc/book/macros.md b/src/doc/book/macros.md
index 7c8b74bd649..f5a0cd5e2c6 100644
--- a/src/doc/book/macros.md
+++ b/src/doc/book/macros.md
@@ -285,9 +285,11 @@ This expands to
 
 ```text
 const char *state = "reticulating splines";
-int state = get_log_state();
-if (state > 0) {
-    printf("log(%d): %s\n", state, state);
+{
+    int state = get_log_state();
+    if (state > 0) {
+        printf("log(%d): %s\n", state, state);
+    }
 }
 ```