[Top][All Lists]

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

Re: status grub2 port of grub-legasy map command

From: Javier Martín
Subject: Re: status grub2 port of grub-legasy map command
Date: Sat, 16 May 2009 00:46:27 +0200

El jue, 14-05-2009 a las 20:38 +0200, Vladimir 'phcoder' Serbinenko
> >> > I'm fine with the change from "const void" to "const char", but we need
> >> > to remove a preceding comment about void labels.
> >> It's not that I'm opposed to void in principle. Just using the same
> >> constructions to do the same things in different files makes code
> >> easier to learn and port
> >
> > I wonder if we can go the other way and use void for all labels without
> > storage.  Indeed, it's too easy to misuse a char variable by forgetting
> > the ampersand before it.
> If you define it as char [] (as done everywhere in grub2), not char,
> you need no ampersand.
Indeed, but I think you are creating a tempest in a teapot. Your
proposal only "saves" the ampersand in the code, while using "void" (or
better, some grub_asmlabel_t typedef'ed to "void" with a comment
explaining why) requires the ampersand - which is not illogic, since you
are taking the address of the label - but protects against accidental
modifications or the surprise factor of "why is mymod_interrupthandler a
char array?".

PS "for the audience": Sorry for being away from the list the days the
patch was finally committed. I'm a bit tied up right now with finals

-- Lazy, Oblivious, Recurrent Disaster -- Habbit

Attachment: signature.asc
Description: Esto es una parte de mensaje firmado digitalmente

reply via email to

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