store: fix issues reported by coverity

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
ceph-monstore-tool: shut up coverity

Signed-off-by: Sage Weil <sage@inktank.com>