Commit 8a9ce071 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r9051] For functions that return a TRUE/FALSE value, we should use a boolean.

Reviewed by guillaume.
parent 88b698b9
...@@ -159,6 +159,11 @@ extern char **environ; ...@@ -159,6 +159,11 @@ extern char **environ;
#define HYDRA_NAMESERVER_DEFAULT_PORT 6392 #define HYDRA_NAMESERVER_DEFAULT_PORT 6392
enum HYD_bool {
HYD_FALSE = 0,
HYD_TRUE = 1
};
/* fd state */ /* fd state */
enum HYD_fd_state { enum HYD_fd_state {
HYD_FD_UNSET = -1, HYD_FD_UNSET = -1,
......
...@@ -248,7 +248,8 @@ static inline void HYDT_topo_cpuset_set(int os_index, struct HYDT_topo_cpuset_t ...@@ -248,7 +248,8 @@ static inline void HYDT_topo_cpuset_set(int os_index, struct HYDT_topo_cpuset_t
cpuset->set[idx] |= mask; cpuset->set[idx] |= mask;
} }
static inline unsigned long HYDT_topo_cpuset_isset(int os_index, struct HYDT_topo_cpuset_t cpuset) static inline enum HYD_bool HYDT_topo_cpuset_isset(int os_index,
struct HYDT_topo_cpuset_t cpuset)
{ {
int idx; int idx;
unsigned long mask; unsigned long mask;
...@@ -256,7 +257,7 @@ static inline unsigned long HYDT_topo_cpuset_isset(int os_index, struct HYDT_top ...@@ -256,7 +257,7 @@ static inline unsigned long HYDT_topo_cpuset_isset(int os_index, struct HYDT_top
idx = (os_index / HYDT_BITS_PER_LONG); idx = (os_index / HYDT_BITS_PER_LONG);
mask = (1UL << (os_index % HYDT_BITS_PER_LONG)); mask = (1UL << (os_index % HYDT_BITS_PER_LONG));
return (cpuset.set[idx] & mask); return ((enum HYD_bool) ((cpuset.set[idx] & mask) != 0));
} }
static inline void HYDT_topo_cpuset_dup(struct HYDT_topo_cpuset_t src, static inline void HYDT_topo_cpuset_dup(struct HYDT_topo_cpuset_t src,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment