mdadm: check value returned by snprintf against errors