GPU: fix code smell

This commit is contained in:
李通洲
2025-03-25 11:03:47 +08:00
parent e474a47fad
commit 88e193e9fd
3 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -426,7 +426,9 @@ static const char* detectPci(const FFGPUOptions* options, FFlist* gpus, FFstrbuf
}
else
{
pPciPath = memrchr(deviceDir->chars, '/', deviceDir->length) + 1;
pPciPath = memrchr(deviceDir->chars, '/', deviceDir->length);
assert(pPciPath);
pPciPath++;
}
uint32_t pciDomain, pciBus, pciDevice, pciFunc;