Fix __builtin_ctz related bug

The previous commit introduces an issue related to __builtin_ctz().

The GCC doc:

 Returns the number of trailing 0-bits in x, starting at the least
 significant bit position. If x is 0, the result is undefined.

The behavier of __builtin_ctz() differs on x86-64 and arm, where the
x86-64 toolchain returns 32 for __builtin_ctz(0), while arm toolchain
returns -1 in such case.

So the issue could not be found by the unit test running on x86-64
system, but is caught when it's running on the real BMC which is ARM.

Tested: Verify the IPv6 netmask settings are correctly parsed on BMC.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I1e803c94fe1adc9c37d4ce3e41108756963d100a
2 files changed