about summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/handle.c b/handle.c
index 422cd76..4383cb0 100644
--- a/handle.c
+++ b/handle.c
@@ -1228,17 +1228,17 @@ static int compar(const void *cmd, const void *_handler) {
 	return strcmp(cmd, handler->cmd);
 }
 
-void handle(struct Message msg) {
-	if (!msg.cmd) return;
-	if (msg.tags[TagPos]) {
-		self.pos = strtoull(msg.tags[TagPos], NULL, 10);
+void handle(struct Message *msg) {
+	if (!msg->cmd) return;
+	if (msg->tags[TagPos]) {
+		self.pos = strtoull(msg->tags[TagPos], NULL, 10);
 	}
 	const struct Handler *handler = bsearch(
-		msg.cmd, Handlers, ARRAY_LEN(Handlers), sizeof(*handler), compar
+		msg->cmd, Handlers, ARRAY_LEN(Handlers), sizeof(*handler), compar
 	);
 	if (handler) {
-		handler->fn(&msg);
-	} else if (strcmp(msg.cmd, "400") >= 0 && strcmp(msg.cmd, "599") <= 0) {
-		handleErrorGeneric(&msg);
+		handler->fn(msg);
+	} else if (strcmp(msg->cmd, "400") >= 0 && strcmp(msg->cmd, "599") <= 0) {
+		handleErrorGeneric(msg);
 	}
 }