This is very minor, but seeing as you're setting `error` to zero above, I'd make this `error |=` instead of `error =` to make it consistent with the way the Windows code looks.