Skip to content

Commit d6eff93

Browse files
committed
GPU: fix usage of bsearch
1 parent 0356538 commit d6eff93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/detection/gpu/gpu_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ static void parsePciIdsFile(const FFstrbuf* content, uint8_t subclass, uint16_t
124124
}
125125

126126
#if FF_HAVE_EMBEDDED_PCIIDS
127-
static inline int pciDeviceCmp(const FFPciDevice* a, const FFPciDevice* b)
127+
static inline int pciDeviceCmp(const uint16_t* key, const FFPciDevice* element)
128128
{
129-
return (int) a->id - (int) b->id;
129+
return (int) *key - (int) element->id;
130130
}
131131

132132
static bool loadPciidsInc(uint8_t subclass, uint16_t vendor, uint16_t device, FFGPUResult* gpu)

0 commit comments

Comments
 (0)