ctdb-common: Fix signed/unsigned comparisons by casting