Skip to contentSkip to conversation

sata_sil: int slow_down uninitialized

DISCUSSION Nigel Kukard 3 participants 3 messages Jul 5, 2008 libata

lore
Share & tools
lore
#0 lore raw

Hi Guys,

Maybe I'm wrong, but line 247 of sata_sil...
static int slow_down;

is not initialized and used on line 540.

Is this right?

-N

#1 lore raw

Hello.

Quoted 7 lines · Nigel Kukard

Maybe I'm wrong, but line 247 of sata_sil...
static int slow_down;

is not initialized and used on line 540.

Is this right?

Yes because unitialized static variables are automatically
initialzied to 0 in C.

MBR, Sergei

#2 lore raw
In reply to Nigel Kukard
Quoted 6 lines · On Sat, 05 Jul 2008 08:58:52 +0000 Nigel Kukard <[email protected]> wrote:

Hi Guys,

Maybe I'm wrong, but line 247 of sata_sil...
static int slow_down;

is not initialized and used on line 540.

Static variables start at zero unless initialised explicitly - C language says that.