aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2007-11-14 11:31:05 +0100
committerJiri Kosina <jkosina@suse.cz>2008-01-28 14:51:19 +0100
commit3ba5619f06300cd0944150901ed20de87483ad8c (patch)
tree2fab950f6766fc7c5d2242ac6063ee92c4e8e546 /include/linux/hid.h
parentHID: Implement horizontal wheel handling for A4 Tech X5-005D (diff)
downloadlinux-dev-3ba5619f06300cd0944150901ed20de87483ad8c.tar.xz
linux-dev-3ba5619f06300cd0944150901ed20de87483ad8c.zip
HID: fix a potential bug in pointer casting
Don't directly cast list_head * to foo *, this works only when list is the first member of struct foo, and we should not make the assumption how members are ordered in the structure. i.e. struct *f = (struct *f)pos will work if: struct foo { struct list_head list; int i; }; but will fail if: struct foo { int i; struct list_head list; } Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions