summaryrefslogtreecommitdiffstats
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-10-02 13:42:14 +0100
committerEric Engestrom <[email protected]>2019-10-07 21:30:16 +0100
commitb9157ea415d9734e67678d2d5a26798d6fa03a02 (patch)
tree26a050c870d52b94e5c0cd8d4fefa055179313e1 /src/loader/loader.c
parent5be6c8959c1c8354423ca4fee2c3da4532100a5c (diff)
loader: use ARRAY_SIZE instead of NULL sentinel
Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 873f55c8a9c..c828105c951 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -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;