aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-01 22:48:57 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-05-01 22:48:57 +1000
commitcb07434913b89580a4025824cb181733b2db1eb7 (patch)
treec2c7e713a150c7f9a947b100e0fa4c56efb5c3b2 /sway/commands
parent51df1d4ff864f9ba6658d568e24554169363df7b (diff)
downloadsway-cb07434913b89580a4025824cb181733b2db1eb7.tar.xz
Remove unnecessary pointers
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/client.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/commands/client.c b/sway/commands/client.c
index ce519381..156ff95c 100644
--- a/sway/commands/client.c
+++ b/sway/commands/client.c
@@ -3,7 +3,7 @@
#include "sway/config.h"
#include "sway/tree/container.h"
-static bool parse_color(char *hexstring, float (*dest)[4]) {
+static bool parse_color(char *hexstring, float dest[static 4]) {
if (hexstring[0] != '#') {
return false;
}
@@ -20,10 +20,10 @@ static bool parse_color(char *hexstring, float (*dest)[4]) {
return false;
}
- (*dest)[0] = ((decimal >> 16) & 0xff) / 255.0;
- (*dest)[1] = ((decimal >> 8) & 0xff) / 255.0;
- (*dest)[2] = (decimal & 0xff) / 255.0;
- (*dest)[3] = 1.0;
+ dest[0] = ((decimal >> 16) & 0xff) / 255.0;
+ dest[1] = ((decimal >> 8) & 0xff) / 255.0;
+ dest[2] = (decimal & 0xff) / 255.0;
+ dest[3] = 1.0;
return true;
}
@@ -34,27 +34,27 @@ static struct cmd_results *handle_command(int argc, char **argv,
return error;
}
- if (!parse_color(argv[0], &class->border)) {
+ if (!parse_color(argv[0], class->border)) {
return cmd_results_new(CMD_INVALID, cmd_name,
"Unable to parse border color");
}
- if (!parse_color(argv[1], &class->background)) {
+ if (!parse_color(argv[1], class->background)) {
return cmd_results_new(CMD_INVALID, cmd_name,
"Unable to parse background color");
}
- if (!parse_color(argv[2], &class->text)) {
+ if (!parse_color(argv[2], class->text)) {
return cmd_results_new(CMD_INVALID, cmd_name,
"Unable to parse text color");
}
- if (!parse_color(argv[3], &class->indicator)) {
+ if (!parse_color(argv[3], class->indicator)) {
return cmd_results_new(CMD_INVALID, cmd_name,
"Unable to parse indicator color");
}
- if (!parse_color(argv[4], &class->child_border)) {
+ if (!parse_color(argv[4], class->child_border)) {
return cmd_results_new(CMD_INVALID, cmd_name,
"Unable to parse child border color");
}