Rma fixes

The first commit is just code formatting updates to better match other sigar conventions.

The second commit fixes a negative array index access bug.