Brian West wrote:
Then again couldn't it be less expensive than the strcmp? all those times? :P

Well, internally getenv has to do lots of string compares to see if the variable is present in the environment, so no, getenv() vs. strcmp() is not a win.


However, if you check it once at the beginning of the load and then use a int/char * variable to remember if it was present, then yes it would be faster than the strcmp(), and we'd want to make it the first part of the expression for that very reason.
_______________________________________________
Asterisk-Dev mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-dev
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to