xmalloc: stop using a magic '1' in alignment padding
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 4 Jul 2019 14:03:47 +0000 (16:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 4 Jul 2019 14:03:47 +0000 (16:03 +0200)
commit782a6b951a2317e1c3ecc81b6d94be09157fc363
treee22cb214adab3bb4b0bc7c3d3ce10e9147bffb2f
parent12dce7ea5a84e0f107710f8df1cfb2dfe306c793
xmalloc: stop using a magic '1' in alignment padding

Alignment padding inserts a pseudo block header in front of the allocation,
sets its size field to the pad size and then ORs in 1, which is equivalent
to marking it as a free block, so that xfree() can distinguish it from a
real block header.

This patch simply replaces the magic '1' with the defined 'FREE_BLOCK' to
make it more obvious what's going on. Also, whilst in the neighbourhood,
it removes a stray space after a cast.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/xmalloc_tlsf.c