loader: use ARRAY_SIZE instead of NULL sentinel

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Eric Engestrom
2019-10-02 13:42:14 +01:00
parent 5be6c8959c
commit b9157ea415
2 changed files with 3 additions and 6 deletions
+3 -1
View File
@@ -56,6 +56,8 @@
#endif
#endif
#include "util/macros.h"
#define __IS_LOADER
#include "pci_id_driver_map.h"
@@ -465,7 +467,7 @@ loader_get_driver_for_fd(int fd)
return driver;
}
for (i = 0; driver_map[i].driver; i++) {
for (i = 0; i < ARRAY_SIZE(driver_map); i++) {
if (vendor_id != driver_map[i].vendor_id)
continue;