grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Bug fix for LVM


From: Felix Zielcke
Subject: Re: [PATCH] Bug fix for LVM
Date: Tue, 28 Jul 2009 23:37:13 +0200

Am Dienstag, den 28.07.2009, 19:42 +0200 schrieb Robert Millan:
> On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote:
> 
> > +static int
> > +probe_raid_level (grub_disk_t disk)
> > +{
> > +  if (disk->dev->id != GRUB_DISK_DEVICE_RAID_ID)
> > +    return -1;
> > +
> > +  return ((struct grub_raid_array *) disk->data)->level;
> > +}
> 
> Since this an ad-hoc function, could you put it in the same block that
> needs it?  If 'static' qualifier is present, it won't result in nested
> function AFAICT.
> 

GCC manual [0] says:

A nested function always has no linkage. Declaring one with extern or
static is erroneous.

[0]
http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Nested-Functions.html#Nested-Functions

-- 
Felix Zielcke
Proud Debian Maintainer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]