fix atoi check and consistency with braces

Signed-off-by: Mattias Andrée <maandree@operamail.com>
make automergeable from gamma-drm

Signed-off-by: Mattias Andrée <maandree@operamail.com>
Merge branch 'multimonitor' into future