cgpt: Rework number of entries calculation

As pointed out by Daniel in CL:234996, the half_size_sectors should have
been checked in both places.

This CL reworks that part of the code to read easier.

BUG=none
BRANCH=none
TEST=unittest

Change-Id: I8faea3b094c375e4fd1a604a8fe759af88943fdf
Reviewed-on: https://chromium-review.googlesource.com/235792
Reviewed-by: Daniel Ehrenberg <dehrenberg@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@chromium.org>
2 files changed