[asterisk-dev] Update coding guidelines

SF Markus Elfring elfring at users.sourceforge.net
Sat Dec 30 02:00:26 MST 2006


Hello,

The instruction 'char *name = "data";' from the example in the section 
"Finishing up before you submit your code" makes me suspicious.
http://asterisk.org/developers/coding-guidelines

It is against the advices from the article 
"http://c-faq.com/decl/strlitinit.html" about the initialisation of 
character arrays with string literals.

An alternative discussion on the topic "simple char* vs char [] 
difference" is also helpful for this use case.
http://groups.google.de/group/comp.lang.c.moderated/browse_frm/thread/48da6a49f9074090

Would you like to fix this detail for const-correctness?
http://svn.digium.com/view/asterisk/trunk/apps/app_skel.c?rev=40722&view=markup
http://bugs.digium.com/view.php?id=8160

Regards,
Markus


More information about the asterisk-dev mailing list