diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index e2c2dfeb8..2fe0350a7 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -377,7 +377,7 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_ } std::vector openCLDriverVer(1024); - if(ret = clGetDeviceInfo(ctx->DeviceID, CL_DRIVER_VERSION, openCLDriverVer.size(), openCLDriverVer.data(), NULL) != CL_SUCCESS) + if((ret = clGetDeviceInfo(ctx->DeviceID, CL_DRIVER_VERSION, openCLDriverVer.size(), openCLDriverVer.data(), NULL)) != CL_SUCCESS) { printer::inst()->print_msg(L1,"WARNING: %s when calling clGetDeviceInfo to get CL_DRIVER_VERSION for device %u.", err_to_str(ret),ctx->deviceIdx ); return ERR_OCL_API; diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp index 795ed1b65..912ef48bb 100644 --- a/xmrstak/backend/cpu/minethd.cpp +++ b/xmrstak/backend/cpu/minethd.cpp @@ -458,18 +458,19 @@ std::vector minethd::thread_starter(uint32_t threadOffset, miner_work static std::string getAsmName(const uint32_t num_hashes) { std::string asm_type = "off"; - if(num_hashes == 0) - return asm_type; - - auto cpu_model = getModel(); - - if(cpu_model.avx && cpu_model.aes) + if(num_hashes != 0) { - if(cpu_model.type_name.find("Intel") != std::string::npos) - asm_type = "intel_avx"; - else if(cpu_model.type_name.find("AMD") != std::string::npos && num_hashes == 1) - asm_type = "amd_avx"; + auto cpu_model = getModel(); + + if(cpu_model.avx && cpu_model.aes) + { + if(cpu_model.type_name.find("Intel") != std::string::npos) + asm_type = "intel_avx"; + else if(cpu_model.type_name.find("AMD") != std::string::npos && num_hashes == 1) + asm_type = "amd_avx"; + } } + return asm_type; } template