dm: replace zero-length array with flexible-array