Added a couple of ASSERTS for avoiding coverity to complain about the possibility of a division by 0

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Fixed build on 32 bits platforms

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Merge pull request #2032 from sponce/wip-fixstriperoni386

Wip fixstriperoni386

Reviewed-by: Sage Weil <sage@redhat.com>