Re: One to many (Dirves to Volumes) patch round 1



On Mon, 2004-07-12 at 21:28 +0200, Christophe Fergeau wrote:
> Hi, 
> 
> Here are a few comments mostly related to coding style, maybe it's a bit
> too early for that ;) I don't know the inner working of the volume stuff
> enough to be in position to make useful comments on it without spending
> quite some time looking at the existing code :-/ Hopefully Alex will
> have some time to look at it.
> 
> Christophe
<snip>
> 
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 gnome-vfs-volume-monitor.c
> --- libgnomevfs/gnome-vfs-volume-monitor.c      26 Nov 2003 12:18:38
> -0000      1.3
> +++ libgnomevfs/gnome-vfs-volume-monitor.c      12 Jul 2004 18:34:14
> -0000
> [...]
> +       vol_list = drive->priv->volumes;
> +       if (vol_list != NULL) {
> +               for (; vol_list != NULL; vol_list = g_list_next
> (vol_list)) {  
> +                       GnomeVFSVolume *volume = GNOME_VFS_VOLUME
> (vol_list->data);
> +                       _gnome_vfs_volume_unset_drive (volume, drive);
> +                       _gnome_vfs_drive_remove_volume (drive, volume);
> +               }
> 
> Wouldn't it be nicer to do
> for (vol_list = drive->priv->volumes; vol_list != NULL; vol_list  =
> g_list_next (vol_list)) {
> 		[...]
> }
> 
Hehe, this was one of the later night changes ;)  Funny I missed that.
Thanks for the input.  It's never too early to start cleaning up code.  

-- 
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.
Blog: http://martianrock.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]