summaryrefslogtreecommitdiffstats
path: root/src/loader
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-06-19 00:16:51 +0100
committerEric Engestrom <[email protected]>2017-06-21 21:42:14 +0100
commit4a1238a452a7e49a6717506ffdbaeab18d90a6be (patch)
tree5af8a8989085fbfdf2d01a42135ac14a278f32ca /src/loader
parent60f984262c4d4c3c3828eb2eec3dc07c63922ece (diff)
egl: turn one more boolean `int` into a `bool`
Same as the previous commit, but this one was split out because it's a bit more complicated: this field is given as a pointer to a function, so the function had to be changed as well, and the function was use in a bunch of places, which needed updating as well. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/loader')
-rw-r--r--src/loader/loader.c10
-rw-r--r--src/loader/loader.h4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 5541ccc2a74..c3fc961be59 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -153,7 +153,7 @@ static char *drm_get_id_path_tag_for_fd(int fd)
return tag;
}
-int loader_get_user_preferred_fd(int default_fd, int *different_device)
+int loader_get_user_preferred_fd(int default_fd, bool *different_device)
{
/* Arbitrary "maximum" value of drm devices. */
#define MAX_DRM_DEVICES 32
@@ -171,7 +171,7 @@ int loader_get_user_preferred_fd(int default_fd, int *different_device)
#endif
if (prime == NULL) {
- *different_device = 0;
+ *different_device = false;
return default_fd;
}
@@ -230,16 +230,16 @@ int loader_get_user_preferred_fd(int default_fd, int *different_device)
return fd;
err:
- *different_device = 0;
+ *different_device = false;
free(default_tag);
free(prime);
return default_fd;
}
#else
-int loader_get_user_preferred_fd(int default_fd, int *different_device)
+int loader_get_user_preferred_fd(int default_fd, bool *different_device)
{
- *different_device = 0;
+ *different_device = false;
return default_fd;
}
#endif
diff --git a/src/loader/loader.h b/src/loader/loader.h
index 84314a4fc04..3859b45dc44 100644
--- a/src/loader/loader.h
+++ b/src/loader/loader.h
@@ -27,6 +27,8 @@
#ifndef LOADER_H
#define LOADER_H
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -51,7 +53,7 @@ loader_get_device_name_for_fd(int fd);
*/
int
-loader_get_user_preferred_fd(int default_fd, int *different_device);
+loader_get_user_preferred_fd(int default_fd, bool *different_device);
/* for logging.. keep this aligned with egllog.h so we can just use
* _eglLog directly.