Skip to content

Commit c8fa26b

Browse files
committed
xfree86: use bool as retval for xf86VTSwitchAway()
Prefer stdbool over our own historical Bool. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
1 parent 16fc5dc commit c8fa26b

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

hw/xfree86/os-support/bsd/console.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*/
55
#include <xorg-config.h>
66

7+
#include <stdbool.h>
8+
79
#include "xf86_console_priv.h"
810
#include "xf86_os_support.h"
911

@@ -13,10 +15,10 @@ void xf86OSRingBell(int loudness, int pitch, int duration)
1315
xf86_console_proc_bell(loudness, pitch, duration);
1416
}
1517

16-
Bool xf86VTSwitchAway(void)
18+
bool xf86VTSwitchAway(void)
1719
{
1820
if (xf86_console_proc_switch_away)
1921
if (xf86_console_proc_switch_away())
20-
return TRUE;
21-
return FALSE;
22+
return true;
23+
return false;
2224
}

hw/xfree86/os-support/shared/VTsw_noop.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ xf86VTSwitchPending(void)
3939
return FALSE;
4040
}
4141

42-
Bool
43-
xf86VTSwitchAway(void)
42+
bool xf86VTSwitchAway(void)
4443
{
45-
return FALSE;
44+
return false;
4645
}
4746

4847
Bool

hw/xfree86/os-support/shared/VTsw_usl.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,15 @@ xf86VTSwitchPending(void)
5757
return xf86Info.vtRequestsPending ? TRUE : FALSE;
5858
}
5959

60-
Bool
61-
xf86VTSwitchAway(void)
60+
bool xf86VTSwitchAway(void)
6261
{
6362
xf86Info.vtRequestsPending = FALSE;
6463
if (seatd_libseat_controls_session())
65-
return TRUE;
64+
return true;
6665
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
67-
return FALSE;
66+
return false;
6867
else
69-
return TRUE;
68+
return true;
7069
}
7170

7271
Bool

hw/xfree86/os-support/solaris/sun_VTsw.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ xf86VTSwitchPending(void)
6666
return xf86Info.vtRequestsPending ? TRUE : FALSE;
6767
}
6868

69-
Bool
70-
xf86VTSwitchAway(void)
69+
bool xf86VTSwitchAway(void)
7170
{
7271
int door_fd;
7372
vt_cmd_arg_t vt_door_arg;
@@ -78,7 +77,7 @@ xf86VTSwitchAway(void)
7877
if (xf86VTPruneDoor) {
7978
xf86VTPruneDoor = 0;
8079
ioctl(xf86Info.consoleFd, VT_RELDISP, 1);
81-
return TRUE;
80+
return true;
8281
}
8382

8483
vt_door_arg.vt_ev = VT_EV_HOTKEYS;
@@ -91,11 +90,11 @@ xf86VTSwitchAway(void)
9190
door_arg.desc_num = 0;
9291

9392
if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0)
94-
return FALSE;
93+
return false;
9594

9695
if (door_call(door_fd, &door_arg) != 0) {
9796
close(door_fd);
98-
return FALSE;
97+
return false;
9998
}
10099

101100
close(door_fd);

hw/xfree86/os-support/xf86_os_support.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndef _XSERVER_XF86_OS_SUPPORT
99
#define _XSERVER_XF86_OS_SUPPORT
1010

11+
#include <stdbool.h>
1112
#include <X11/Xdefs.h>
1213

1314
#include "os.h"
@@ -38,7 +39,7 @@ Bool xf86VTKeepTtyIsSet(void);
3839

3940
Bool xf86VTActivate(int vtno);
4041
Bool xf86VTSwitchPending(void);
41-
Bool xf86VTSwitchAway(void);
42+
bool xf86VTSwitchAway(void);
4243
Bool xf86VTSwitchTo(void);
4344
void xf86VTRequest(int sig);
4445
int xf86ProcessArgument(int argc, char **argv, int i);

0 commit comments

Comments
 (0)