]> git.ozlabs.org Git - ccan/commit
altstack: Use ptrint instead of bare casts
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 3 Jun 2016 08:42:01 +0000 (18:42 +1000)
committerDan Good <dan@dancancode.com>
Thu, 16 Jun 2016 20:18:52 +0000 (20:18 +0000)
commit029a45b84fe60f8012dc1c740709db2c2e620d38
tree2923abedd06ecdfeb32fb28e7270f912e46f3dee
parent15c555b335126e5210c2847048f85dd078e71cf7
altstack: Use ptrint instead of bare casts

Functions invoked with altstack take a void * parameter.  However, the
test program wants to pass an integer, and so uses the trick of casting
the integer values to (void *) and back again.

The ptrint() module handles exactly this case in a more portable and
(somewhat) typesafe way, so use that instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/altstack/_info
ccan/altstack/test/run.c