Magnetic-field-tuned charge density wave in SmNiC2 and NdNiC2