lkml.org 
[lkml]   [2004]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Any reason why we don't initialize all members of struct Xgt_desc_struct in doublefault.c ?
Jeff Garzik wrote:
> Jesper Juhl wrote:
>
>> Yes, this is nitpicking, but I just can't leave small corners like
>> this unpolished ;)
>>
>> in arch/i386/kernel/doublefault.c you will find this (line 20) :
>>
>> struct Xgt_desc_struct gdt_desc = {0, 0};
>>
>> but, struct Xgt_desc_struct has 3 members,
>> struct Xgt_desc_struct {
>> unsigned short size;
>> unsigned long address __attribute__((packed));
>> unsigned short pad;
>> } __attribute__ ((packed));
>>
>> so why only initialize two of them explicitly?
>
>
> 'pad' is a dummy variable... nobody cares about its value.
>
Ok, good reason. Thank you for taking the time to reply.

--
Jesper Juhl
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.160 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site