snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/vendor", dirent->d_name);
file = hwloc_fopen(path, "r", root_fd);
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
attr->vendor_id = strtoul(value, NULL, 16);
snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/device", dirent->d_name);
file = hwloc_fopen(path, "r", root_fd);
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
attr->device_id = strtoul(value, NULL, 16);
snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/class", dirent->d_name);
file = hwloc_fopen(path, "r", root_fd);
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
attr->class_id = strtoul(value, NULL, 16) >> 8;
snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/subsystem_vendor", dirent->d_name);
file = hwloc_fopen(path, "r", root_fd);
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
attr->subvendor_id = strtoul(value, NULL, 16);
snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/subsystem_device", dirent->d_name);
file = hwloc_fopen(path, "r", root_fd);
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
attr->subdevice_id = strtoul(value, NULL, 16);
domain, pcidev->bus, pcidev->dev, pcidev->func);
file = fopen(path, "r");
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
obj->attr->pcidev.vendor_id = strtoul(value, NULL, 16);
domain, pcidev->bus, pcidev->dev, pcidev->func);
file = fopen(path, "r");
if (file) {
- read = fread(value, sizeof(value), 1, file);
+ read = fread(value, 1, sizeof(value), file);
fclose(file);
if (read)
obj->attr->pcidev.device_id = strtoul(value, NULL, 16);