All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin D Bennett <colin@gibibit.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Cc: fzielcke@z-51.de
Subject: Re: [RFC] USB Support
Date: Sun, 31 Aug 2008 08:59:14 -0700	[thread overview]
Message-ID: <20080831085914.341797ab@gamma.lan> (raw)
In-Reply-To: <1219918619.4598.43.camel@fz.local>

[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]

On Thu, 28 Aug 2008 12:16:59 +0200
Felix Zielcke <fzielcke@z-51.de> wrote:

> +  grub_usb_iterate (usb_iterate);
> +}
> +
> +\f
> 
> Weird `\f' 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-08-31 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 19:56 [RFC] USB Support Marco Gerards
2008-08-28 10:16 ` Felix Zielcke
2008-08-31 15:59   ` Colin D Bennett [this message]
2008-08-31 16:13     ` Felix Zielcke
2008-08-31 16:28       ` Colin D Bennett
2008-08-30 11:53 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080831085914.341797ab@gamma.lan \
    --to=colin@gibibit.com \
    --cc=fzielcke@z-51.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.