Re: Fixing gvfs-backend-afc for iPhone/iPod Touch access
- From: Bastien Nocera <hadess hadess net>
- To: "Martin S." <info sukimashita com>
- Cc: gvfs-list gnome org
- Subject: Re: Fixing gvfs-backend-afc for iPhone/iPod Touch access
- Date: Wed, 05 Aug 2009 12:35:01 +0100
On Wed, 2009-08-05 at 10:46 +0100, Bastien Nocera wrote:
<snip>
> > - Run "indent xy" to apply GVFS coding style (What indent rules does
> > GVFS use?)
>
> Don't know, but my vim rules will help. I'll try and do that today.
A couple of notes:
- no orphan opening brackets
- space before bracket for a function call (not a macro)
- use curly braces when you have a multi-line condition
- use curly braces for both branches of the condition if one of the
branches needs them
- g_free() can be passed NULL
- multi-line function name/declarations (see patch)
- use g_strcmp0, or g_str_equal when possible
I also:
- fixed a memleak in g_vfs_afc_volume_has_uuid() (leaking UUID)
- used atoi instead of sscanf(str, "%d", &virtual_port);
TODO:
- In the volume monitor, there's a big number of functions returning
NULL. Would be nice to see whether the default is to return NULL (if so,
remove them), or check whether they need to be implemented (in which
case add a comment to that effect).
- Couple of memleaks in there, see FIXMEs.
- More g_strcmp0 or g_str_equal usage
- Add translator comments and check the translatable strings against
those already used in gvfs backends
Cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]