summaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-04 09:07:01 -0600
committerJens Axboe <axboe@kernel.dk>2018-10-04 09:07:01 -0600
commitf1867a7f9e588acf67cf8fa96eab8a6e2fdedcf6 (patch)
tree0585e7ba23a20b49cf20f1c658c2a2035b0c801b /server.c
parent8772acb0435c6a378951458d8fd9b18e1ab1add0 (diff)
downloadfio-f1867a7f9e588acf67cf8fa96eab8a6e2fdedcf6.tar.gz
fio-f1867a7f9e588acf67cf8fa96eab8a6e2fdedcf6.tar.bz2
Bool conversions
Just various low hanging fruits in terms of local or global variables that are only 0/1, switch them to boolean. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'server.c')
-rw-r--r--server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.c b/server.c
index 1c075019..90d3396b 100644
--- a/server.c
+++ b/server.c
@@ -28,7 +28,7 @@
int fio_net_port = FIO_NET_PORT;
-int exit_backend = 0;
+bool exit_backend = false;
enum {
SK_F_FREE = 1,
@@ -995,7 +995,7 @@ static int handle_command(struct sk_out *sk_out, struct flist_head *job_list,
ret = 0;
break;
case FIO_NET_CMD_EXIT:
- exit_backend = 1;
+ exit_backend = true;
return -1;
case FIO_NET_CMD_LOAD_FILE:
ret = handle_load_file_cmd(cmd);
@@ -2492,7 +2492,7 @@ void fio_server_got_signal(int signal)
sk_out->sk = -1;
else {
log_info("\nfio: terminating on signal %d\n", signal);
- exit_backend = 1;
+ exit_backend = true;
}
}
@@ -2574,7 +2574,7 @@ int fio_start_server(char *pidfile)
setsid();
openlog("fio", LOG_NDELAY|LOG_NOWAIT|LOG_PID, LOG_USER);
- log_syslog = 1;
+ log_syslog = true;
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);