d2: declare correct char variable to be used for switch

Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>