ca-cas-repack: Pass proper size to msync

msync() can only be applied to the header; not the actual file data.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Add curly braces to multiline "if" statements

This is purely a style thing.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Remove risky use of post-increment

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>