edid: Shorten two code snippets.