Don't cast a function pointer to a data pointer

That's nonstandard. Instead, convert to an integer.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-11-02 22:32:50 +01:00
parent 6aa9f32124
commit ee8109541a

View file

@ -54,7 +54,7 @@ void null_pointer_call(const char *name)
(void) name;
unsigned (*p)(void);
mbedtls_platform_zeroize(&p, sizeof(p));
mbedtls_printf("%p() -> %u\n", (void *) p, p());
mbedtls_printf("%llx() -> %u\n", (unsigned long long) p, p());
}