pgsql: Make NUM_TOCHAR_prepare and NUM_TOCHAR_finish macros declare "le

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make NUM_TOCHAR_prepare and NUM_TOCHAR_finish macros declare "le
Date: 2013-12-02 15:52:57
Message-ID: E1VnVnt-0007GQ-2q@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-12-02 16:19:44 pgsql: Flag mmap implemenation of dynamic shared memory as resize-capab
Previous Message Robert Haas 2013-12-02 15:44:13 pgsql: Avoid out-of-bounds read in errfinish if error_stack_depth < 0.