Hi Denis,

>-----Original Message-----
>From: [email protected] [mailto:[email protected]] On Behalf Of
>Denis Kenzior
>Sent: Wednesday, March 17, 2010 4:30 AM
>To: [email protected]
>Subject: Re: [PATCH 2/4] Handle the conversion failure when parsing item
>
>Hi Yang,
>
>> -    item->text = sim_string_to_utf8(data+1, len-1);
>> +    utf8 = sim_string_to_utf8(data+1, len-1);
>
>I applied the patch and fixed up the arithmetic operator style issue.  Please
>make sure you follow this convention from now on.

Thank you, and I will pay attention to this in future. 

I'm always wondering what's the complete coding style we should follow. Can we 
have some document to describe them? I have collected some of them:
1. Check the patch using checkpatch.pl (checkpatch.pl --no-tree patch_name). In 
theory, you need to clean up all the warnings and errors except one "ERROR: 
Missing Signed-off-by: line(s)". However, sometimes, the warning of exceeding 
maximum characters for a line (80 characters) can be ignored.
2. There should be a blank line before if statement, unless it is nested and 
not preceded by an expression or variable declaration.
3. There should be space before and after operator.
4. It's better not to have a complicated statement for if. You may judge its 
contrary condition and return | break | continue ASAP.
5. Better to use abbreviation, rather than full name, to name a variable, 
function, struct, etc.
Any others?

>
>Regards,
>-Denis
>_______________________________________________
>ofono mailing list
>[email protected]
>http://lists.ofono.org/listinfo/ofono


Regards,
-Yang
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to