All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Bug fix for LVM
Date: Tue, 28 Jul 2009 19:42:23 +0200	[thread overview]
Message-ID: <20090728174223.GC32726@thorin> (raw)
In-Reply-To: <ca0f59980907280815x17dfd0bdg4d987736250b7555@mail.gmail.com>

On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote:
> -  buf2 = grub_zalloc (size);
> +  buf2 = grub_malloc (size);
>    if (!buf2)
>      return grub_errno;
>  
> +  grub_memset (buf, 0, size);

We just received 'buf' as parameter.  Why do we have to zero it here?

> +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.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



  parent reply	other threads:[~2009-07-28 21:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 14:11 [PATCH] Bug fix for LVM Bean
2009-07-18 19:11 ` Robert Millan
2009-07-18 19:43   ` Bean
2009-07-18 19:57     ` Robert Millan
2009-07-18 19:59     ` Vladimir 'phcoder' Serbinenko
2009-07-18 20:05       ` Robert Millan
2009-07-19  9:41         ` Bean
2009-07-22 17:29           ` Robert Millan
2009-07-22 17:33           ` Robert Millan
2009-07-22 18:58             ` Bean
2009-07-25 16:05               ` Robert Millan
2009-07-19 19:11 ` Patrik Horník
2009-07-19 19:34   ` Bean
2009-07-25 20:37     ` Felix Zielcke
2009-07-27 20:58     ` Patrik Horník
2009-07-28  3:27       ` Bean
2009-07-28 13:57         ` Bean
2009-07-28 15:15           ` Bean
2009-07-28 15:16             ` Bean
2009-07-28 17:42             ` Robert Millan [this message]
2009-07-28 21:37               ` Felix Zielcke
2009-07-29  3:22               ` Bean
2009-07-31 15:44                 ` Robert Millan
2009-07-30 16:47             ` Patrik Horník
2009-07-31  4:41             ` Pavel Roskin
2009-07-31 14:28               ` Bean
2009-07-31 18:30                 ` Felix Zielcke
2009-08-06  7:07                   ` Felix Zielcke

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=20090728174223.GC32726@thorin \
    --to=rmh@aybabtu.com \
    --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.