Skip to content

Commit

Permalink
GPU: fix usage of bsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 27, 2024
1 parent 0356538 commit d6eff93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/detection/gpu/gpu_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ static void parsePciIdsFile(const FFstrbuf* content, uint8_t subclass, uint16_t
}

#if FF_HAVE_EMBEDDED_PCIIDS
static inline int pciDeviceCmp(const FFPciDevice* a, const FFPciDevice* b)
static inline int pciDeviceCmp(const uint16_t* key, const FFPciDevice* element)
{
return (int) a->id - (int) b->id;
return (int) *key - (int) element->id;
}

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

0 comments on commit d6eff93

Please sign in to comment.