if (fd != -1) {
len = read(fd, &name, 64);
if (len > 1) {
+ // use strndup
device->name = malloc((sizeof(char) * len) + sizeof(char));
strncpy(device->name, name, len);
}
int i = 0;
for (i; i < plat->iio_device_count; i++) {
#if 0
+ // compare with devices array
if (!strcmp() {
}
#endif