From 7adc937c2e9f17a1707573b49dc00df9a25763ca Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 15 Aug 2014 21:03:07 +0300 Subject: [PATCH] Code issues doc trivia --- doc/code-issues.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/code-issues.rst b/doc/code-issues.rst index fc2e56a6..892de25f 100644 --- a/doc/code-issues.rst +++ b/doc/code-issues.rst @@ -127,10 +127,10 @@ Multi-statement macros should use a ``do-while(0)`` construct:: Use parentheses when referring to macro arguments and the final macro result to minimize error proneness:: - #define MULTIPLY(a,b) ((a)*(b)) + #define MULTIPLY(a,b) ((a) * (b)) - /* Now MULTIPLY(1+2,3) expands to ((1+2)*(3)) == 9, not - * 1+2*3 == 7. Parentheses are used around macro result for + /* Now MULTIPLY(1 + 2, 3) expands to ((1 + 2) * (3)) == 9, not + * 1 + 2 * 3 == 7. Parentheses are used around macro result for * similar reasons. */