odhcp6c: fix some issue discovered by scan-build