From dbfce2a4d8ea0bd4773eacf154fd3e3406d1be5e Mon Sep 17 00:00:00 2001 From: mmcc Date: Tue, 8 Dec 2015 00:51:17 +0000 Subject: Use ^= instead of a verbose alternative. ok nicm@ --- cmd-switch-client.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd-switch-client.c b/cmd-switch-client.c index dbdc5b63..4c847584 100644 --- a/cmd-switch-client.c +++ b/cmd-switch-client.c @@ -52,12 +52,8 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq) if ((c = cmd_find_client(cmdq, args_get(args, 'c'), 0)) == NULL) return (CMD_RETURN_ERROR); - if (args_has(args, 'r')) { - if (c->flags & CLIENT_READONLY) - c->flags &= ~CLIENT_READONLY; - else - c->flags |= CLIENT_READONLY; - } + if (args_has(args, 'r')) + c->flags ^= CLIENT_READONLY; tablename = args_get(args, 'T'); if (tablename != NULL) { -- cgit v1.2.3