diff options
author | mmcc <mmcc> | 2015-12-08 00:51:17 +0000 |
---|---|---|
committer | mmcc <mmcc> | 2015-12-08 00:51:17 +0000 |
commit | dbfce2a4d8ea0bd4773eacf154fd3e3406d1be5e (patch) | |
tree | 8643cb79db41049f8b17148647b666d6c94733d2 | |
parent | b9563340b7e9f516f77e674791e7635e948ca7fa (diff) |
Use ^= instead of a verbose alternative. ok nicm@
-rw-r--r-- | cmd-switch-client.c | 8 |
1 files 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) { |