grub-devel
[Top][All Lists]
Advanced

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

Re: Just a cosmetic question about grub_vprintf()?


From: Colin Watson
Subject: Re: Just a cosmetic question about grub_vprintf()?
Date: Sun, 29 Nov 2009 09:19:19 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Nov 28, 2009 at 06:21:20PM +0000, rubisher wrote:
> Robert Millan wrote:
>> On Sun, Nov 22, 2009 at 01:10:11PM +0000, rubisher wrote:
>>> But as far as the 1st parameter of grub_vsprintf is a pointer,
>>> wouldn't it be better to write:
>>> --- kern/misc.c.orig        2009-11-22 13:07:22.000000000 +0000
>>> +++ kern/misc.c     2009-11-22 13:07:51.000000000 +0000
>>> @@ -160,7 +160,7 @@
>>>  {
>>>    int ret;
>>>
>>> -  ret = grub_vsprintf (0, fmt, args);
>>> +  ret = grub_vsprintf (NULL, fmt, args);
>>>    return ret;
>>>  }
>>
>> Yes.  But we have many of those, so we don't go huntin' them.  If you'd
>> like to help us, a patch that does this change in bulk would be welcome.
>
> It will be of great pleasure for me, but I didn't foreseen so much (the 
> most difficult to me are 'opaque pointer') but I hoppe that such 'sparse' 
> would help me for the most ;<)

If you do this, make sure you understand why it makes no difference in
standards-compliant C. In particular, this understanding matters when
functions with variable-length argument lists are concerned.

(See the C FAQ for more details.)

-- 
Colin Watson                                       address@hidden




reply via email to

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