Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why is sizeof value screwed up

Status
Not open for further replies.

emiii

Programmer
Jul 12, 2007
1
US
Hi all,

I have a printk (kernel code) that prints out a sizeof value. Normally it prints out the correct value. But in one weird test, the sizeof value printed out is totally wrong.

Since sizeof value is determined at compile time, I would guess it is not sizeof that is wrong, but something else is screwing up my printk.

But what? Could anyone think of possible reasons a value like this can be screwed up?

Thanks a lot!
 
Since you didn't show any code, I have no idea.
All I can think of is that you're trying to take the sizeof a pointer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top