Fix compilation on 32-bit machines

Signed-off-by: Andrea Law <alaw@pivotal.io>
noop
correct swap calculation