livepatch/sample: Use the right type for the leaking data pointer
authorPetr Mladek <pmladek@suse.com>
Thu, 16 Jan 2020 15:31:42 +0000 (16:31 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 17 Jan 2020 10:12:06 +0000 (11:12 +0100)
commit8f6b88662cacb1d01398c1e8be52aeac433189f6
tree29ed4a7bbc4cbff644df8f5cf54400956ccb09c9
parentf838767555d40f29bc4771c5c8cc63193094b7cc
livepatch/sample: Use the right type for the leaking data pointer

The "leak" pointer, in the sample of shadow variable API, is allocated
as sizeof(int). Let's help developers and static analyzers with
understanding the code by using the appropriate pointer type.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
samples/livepatch/livepatch-shadow-fix1.c
samples/livepatch/livepatch-shadow-fix2.c
samples/livepatch/livepatch-shadow-mod.c