[OpenSIPS-Devel] Return codes and str initialization
Sergio Gutierrez
saguti at gmail.com
Thu Nov 13 16:41:02 CET 2008
Hello to all members.
I have a couple questions about handling to things within OpenSIPS modules.
* What is the right way to initialize/assing the len field of a str struct?
When checking code, I have seen that in some places it is initialized with
strlen of s field, in others with strlen+1, and in others strlen-1.
Besides, what is the recommended way to initialize at declaration a str
struct: Direct assignation, or using the STR_INIT macro?
* What is the right code for non error conditions in module functions?
Should it be zero or nonzero value?
Thanks in advancefor your attention, and I apologize for the "newbie"
question.
Best regards.
--
Sergio Gutiérrez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/devel/attachments/20081113/7c520089/attachment.htm
More information about the Devel
mailing list