Re: nautilus volume monitor patch
- From: Alex Larsson <alexl redhat com>
- To: Bastien Nocera <hadess hadess net>
- Cc: Nautilus List <nautilus-list gnome org>
- Subject: Re: nautilus volume monitor patch
- Date: Wed, 22 May 2002 13:58:09 -0400 (EDT)
On 22 May 2002, Bastien Nocera wrote:
> > @@ -1869,24 +1890,40 @@
> > nautilus_volume_monitor_get_mount_name_for_display (NautilusVolumeMonitor *monitor,
> > const NautilusVolume *volume)
> > {
> > - const char *name, *found_name;
> > + const char *found_name;
> > + char *name, *stripped = NULL;
> >
> > We don't initialize variables in the declaration.
> >
> > } else {
> > - return g_strdup (name);
> > + char *retval;
> > +
> > + retval = g_strdup (name);
> > + g_free (stripped);
> > + return retval;
> > }
> >
> > All variable declarations go at the start of the function.
>
> I replaced all this cruft with basename. Thing I didn't know, there are
> 2 different basename() in libc, and we want to use the most portable one
> (see comment in patch).
Even better might be g_path_get_basename()
Other than that it looks ok to me.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a time-tossed devious shaman whom everyone believes is mad. She's an
enchanted tempestuous bounty hunter with a song in her heart and a spring in
her step. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]