Hi,
>>>>> On Tue, 1 Aug 2006 21:29:25 +0200
>>>>> manu@... said:
manu> Why is that one required?
manu> I was about to make that change in the code:
manu> #ifdef HAVE_RES_NINIT
manu> #define RES_NINIT(res) res_ninit(res)
manu> #else
manu> #define RES_NINIT(res) \
manu> ((_res.options & RES_INIT) == 0 && res_init())
manu> #endif
manu> #ifdef HAVE_RES_NDESTROY
manu> # define RES_NDESTROY(res) res_ndestroy(res)
manu> #else
manu> # ifdef HAVE_RES_NCLOSE
manu> # define RES_NDESTROY(res) res_nclose(res)
manu> # else
manu> # define RES_NDESTROY(res)
manu> # endif
manu> #endif
manu> And use the macro like this:
manu> if (RES_NINIT(res) != 0) {
manu> ...
manu> }
The return value of res_ninit() was not tested, but is tested now.
res_ninit(&res) != 0
is expand to
((_res.options & RES_INIT) == 0 && res_init()) != 0
It is not same with
(_res.options & RES_INIT) == 0 && res_init() != 0
exactly. As far as testing if the return value of res_ninit() is 0 or
not, they come to same result. However, it is slightly tricky. In
anyway, the current code is valid.
Sincerely,
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@... ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/Message
Re: [milter-greylist] milter-greylist 2.1.11
2006-08-02 by Hajimu UMEMOTO
Attachments
- No local attachments were found for this message.