Update mmaps.c

error return values fixed;
removed undefined variable lresult reference