Refactor some network.c code to create cidr_set_masklen_internal().
Merge several copies of "copy an inet value and adjust the mask length"
code to create a single, conveniently C-callable function. This function
is exported for future use by inet SPGiST support, but it's good cleanup
anyway since we had three slightly-different-for-no-good-reason copies.
(Extracted from a larger patch, to separate new code from refactoring
of old code)
Emre Hasegeli
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/7b405b3e04779fc0a026c9c6ac3e06194948b253
Modified Files
--------------
src/backend/utils/adt/network.c | 109 +++++++++++-----------------------------
src/include/utils/inet.h | 5 +-
2 files changed, 33 insertions(+), 81 deletions(-)