git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 7d1b8e7) | patch
Rely on sizeof(typename) rather than sizeof(variable) in pqformat.h.
2017年10月13日 15:46:05 +0000 (11:46 -0400)
2017年10月13日 15:46:05 +0000 (11:46 -0400)
commit 5229db6c6f92515afcd698cf5d5badc12ffe6bc2
Rely on sizeof(typename) rather than sizeof(variable) in pqformat.h.

In each of the pq_writeintN functions, the three uses of sizeof() should
surely all be consistent. I started out to make them all sizeof(ni),
but on reflection let's make them sizeof(typename) instead. That's more
like our usual style elsewhere, and it's just barely possible that the
failures buildfarm member hornet has shown since 4c119fbcd went in are
caused by the compiler getting confused about sizeof() a parameter that
it's optimizing away.

In passing, improve a couple of comments.

Discussion: https://postgr.es/m/E1e2RML-0002do-Lc@gemulon.postgresql.org
src/include/libpq/pqformat.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /