Add extra parentheses to make compiler happy

doometernal
jackun 2 years ago
parent 4f02e20205
commit 4a33838bcd
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -616,7 +616,7 @@ void init_gpu_stats(uint32_t& vendorID, uint32_t reported_deviceID, overlay_para
FILE *fp;
char str[10];
string device = path + "/device/device";
if (fp = fopen(device.c_str(), "r")){
if ((fp = fopen(device.c_str(), "r"))){
fscanf(fp, "%s", str);
uint32_t temp = strtol(str, NULL, 16);
if (temp != reported_deviceID && deviceID != 0){
@ -627,7 +627,7 @@ void init_gpu_stats(uint32_t& vendorID, uint32_t reported_deviceID, overlay_para
fclose(fp);
}
string vendor = path + "/device/vendor";
if (fp = fopen(vendor.c_str(), "r")){
if ((fp = fopen(vendor.c_str(), "r"))){
fscanf(fp, "%s", str);
uint32_t temp = strtol(str, NULL, 16);
if (temp != vendorID)

Loading…
Cancel
Save