dock-apps-builder: tidy mirgration C code