Mesa (master): loader: s/int/bool/ for predicate result

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 7 20:31:56 UTC 2019


Module: Mesa
Branch: master
Commit: 5be6c8959c1c8354423ca4fee2c3da4532100a5c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5be6c8959c1c8354423ca4fee2c3da4532100a5c

Author: Eric Engestrom <eric.engestrom at intel.com>
Date:   Wed Oct  2 20:09:50 2019 +0100

loader: s/int/bool/ for predicate result

Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

---

 src/loader/pci_id_driver_map.c | 8 +++++---
 src/loader/pci_id_driver_map.h | 5 +++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/loader/pci_id_driver_map.c b/src/loader/pci_id_driver_map.c
index 8b2079e4354..d599abf78a5 100644
--- a/src/loader/pci_id_driver_map.c
+++ b/src/loader/pci_id_driver_map.c
@@ -21,7 +21,9 @@
  * SOFTWARE.
  */
 
-int is_nouveau_vieux(int fd);
+#include <stdbool.h>
+
+bool is_nouveau_vieux(int fd);
 
 #ifdef HAVE_LIBDRM
 
@@ -42,7 +44,7 @@ nouveau_chipset(int fd)
    return gp.value;
 }
 
-int
+bool
 is_nouveau_vieux(int fd)
 {
    int chipset = nouveau_chipset(fd);
@@ -52,6 +54,6 @@ is_nouveau_vieux(int fd)
 
 #else
 
-int is_nouveau_vieux(int fd) { return 0; }
+bool is_nouveau_vieux(int fd) { return false; }
 
 #endif
diff --git a/src/loader/pci_id_driver_map.h b/src/loader/pci_id_driver_map.h
index 2909f69f24f..63fb1ae01b6 100644
--- a/src/loader/pci_id_driver_map.h
+++ b/src/loader/pci_id_driver_map.h
@@ -1,6 +1,7 @@
 #ifndef _PCI_ID_DRIVER_MAP_H_
 #define _PCI_ID_DRIVER_MAP_H_
 
+#include <stdbool.h>
 #include <stddef.h>
 
 #ifndef ARRAY_SIZE
@@ -83,14 +84,14 @@ static const int vmwgfx_chip_ids[] = {
 #undef CHIPSET
 };
 
-int is_nouveau_vieux(int fd);
+bool is_nouveau_vieux(int fd);
 
 static const struct {
    int vendor_id;
    const char *driver;
    const int *chip_ids;
    int num_chips_ids;
-   int (*predicate)(int fd);
+   bool (*predicate)(int fd);
 } driver_map[] = {
    { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
    { 0x8086, "iris", iris_chip_ids_1, ARRAY_SIZE(iris_chip_ids_1) },




More information about the mesa-commit mailing list