pgsql: Make NUM_TOCHAR_prepare and NUM_TOCHAR_finish macros declare "le - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Make NUM_TOCHAR_prepare and NUM_TOCHAR_finish macros declare "le
Date
Msg-id E1VnVnt-0007GQ-2q@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Make NUM_TOCHAR_prepare and NUM_TOCHAR_finish macros declare "len".

Remove the variable from the enclosing scopes so that nothing can be
relying on it.  The net result of this refactoring is that we get rid
of a few unnecessary strlen() calls.

Original patch from Greg Jaskiewicz, substantially expanded by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a8656a3ab02db5b1de0d696dc8cf588efe7c1341

Modified Files
--------------
src/backend/utils/adt/formatting.c |   33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Avoid out-of-bounds read in errfinish if error_stack_depth < 0.
Next
From: Robert Haas
Date:
Subject: pgsql: Flag mmap implemenation of dynamic shared memory as resize-capab