grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] USB Support


From: Colin D Bennett
Subject: Re: [RFC] USB Support
Date: Sun, 31 Aug 2008 08:59:14 -0700

On Thu, 28 Aug 2008 12:16:59 +0200
Felix Zielcke <address@hidden> wrote:

> +  grub_usb_iterate (usb_iterate);
> +}
> +
> +
> 
> Weird `' character which seems not to make sense.

Actually that is a form feed character, which the GNU coding standard
recommends to be used to break up source code at logical places:

  Please use formfeed characters (control-L) to divide the program into
  pages at logical places (but not within a function). It does not
  matter just how long the pages are, since they do not have to fit on a
  printed page. The formfeeds should appear alone on lines by
  themselves. 
(http://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting)


> Index: bus/usb/uhci.c
> ===================================================================
> --- bus/usb/uhci.c    (revision 0)
> +++ bus/usb/uhci.c    (revision 0)
> 
> 
> + fail:
> +  if (u)
> +    {
> +      grub_free ((void *) u->qh);
> +      grub_free (u->framelist);
> +    }
> +  grub_free (u);
> 
> util/misc.c: grub_free () doestn't check *ptr before calling free ()
> But better util/misc.c get's changed then your code and bus/usb/uhci
> isn't compiled for grub-emu anyway :)

But the C standard says it's OK to call free() with a NULL pointer.


Regards,
Colin

Attachment: signature.asc
Description: PGP signature


reply via email to

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