devicestate.c: Minor tweaks