|
|
Log in / Subscribe / Register

Straightening out ioctl() size confusion

Straightening out ioctl() size confusion

Posted Jan 22, 2013 19:15 UTC (Tue) by awardak (guest, #88954)
Parent article: Straightening out ioctl() size confusion

How does this work:
sizeof(t) == sizeof(t[1])


to post comments

Straightening out ioctl() size confusion

Posted Jan 24, 2013 19:57 UTC (Thu) by jimparis (guest, #38647) [Link]

That expression is true if "t" is a type, and fails to compile if "t" is a number, which is the main error that they were trying to catch. It also handles various other cases like passing an array type, see http://marc.info/?l=linux-kernel&m=106297035619199&... and subsequent messages.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds