All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Davidlohr Bueso <dave@gnu.org>
Cc: Petr Uzel <petr.uzel@suse.cz>, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 2/2] fdisk: API: comment labels array
Date: Tue, 24 Jul 2012 14:49:45 +0200	[thread overview]
Message-ID: <20120724124945.GM736@x2.net.home> (raw)
In-Reply-To: <1343133630.2686.16.camel@offbook>

On Tue, Jul 24, 2012 at 02:40:30PM +0200, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <dave@gnu.org>
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> ---
>  fdisks/utils.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/fdisks/utils.c b/fdisks/utils.c
> index 8de64c2..c4ffe04 100644
> --- a/fdisks/utils.c
> +++ b/fdisks/utils.c
> @@ -35,7 +35,9 @@
>  int fdisk_debug_mask;
>  
>  /*
> - * label probing functions
> + * Label probing functions.
> + * Must have the same order as fdisk_labeltype as the index
> + * depends on it.

This (rely on comment) is bad way.

>   */
>  static const struct fdisk_label *labels[] =
>  {

Use:

 static const struct fdisk_label[] =
 {
    [XXX_LABEL] = &xxx_label,
    [YYY_LABEL] = &yyy_label
 }

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2012-07-24 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 12:40 [PATCH 2/2] fdisk: API: comment labels array Davidlohr Bueso
2012-07-24 12:49 ` Karel Zak [this message]
2012-07-24 12:57   ` Davidlohr Bueso
2012-07-24 14:18     ` Karel Zak
2012-07-26  9:13 ` Karel Zak

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=20120724124945.GM736@x2.net.home \
    --to=kzak@redhat.com \
    --cc=dave@gnu.org \
    --cc=petr.uzel@suse.cz \
    --cc=util-linux@vger.kernel.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.