]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commit
Add an explicit type parameter to the P2ROUNDUP() macro
authorPaul Durrant <pdurrant@amazon.com>
Wed, 31 Aug 2022 13:11:36 +0000 (14:11 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Wed, 31 Aug 2022 15:39:51 +0000 (16:39 +0100)
commit703e1e6e4239fccf6e2f084be4f4dec3c19aad8c
tree85522e519dbc34a00e23c805444cf6a0663f0941
parentd0b04afb3cd6f81488931943f696355c7ced1d0c
Add an explicit type parameter to the P2ROUNDUP() macro

Because it uses signed logic internally it is currently quite vulnerable to
mismatched argument types leading to weird evaluations. Therefore it's safer
to give it an explicit type parameter and have it cast its other arguments to
that type.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
src/common/util.h
src/xen/system.c
src/xenbus/cache.c