From b8e45d120ce97dd85e0fe13b4114593407da9973 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 2 Oct 2014 11:42:15 +0200 Subject: [PATCH] move a variable declaration to the right place Signed-off-by: Felix Fietkau --- commands-wms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands-wms.c b/commands-wms.c index 825480b..e3744c1 100644 --- a/commands-wms.c +++ b/commands-wms.c @@ -246,9 +246,9 @@ pdu_decode_address(char *str, unsigned char *data, int len) *str = 0; } -static void wms_decode_address(char *str, char *name, unsigned char *data, int len) +static void wms_decode_address(char *name, unsigned char *data, int len) { - str = blobmsg_alloc_string_buffer(&status, name, len * 2 + 2); + char *str = blobmsg_alloc_string_buffer(&status, name, len * 2 + 2); pdu_decode_address(str, data, len); blobmsg_add_string_buffer(&status); } @@ -273,7 +273,7 @@ static void cmd_wms_get_message_cb(struct qmi_dev *qmi, struct qmi_request *req, return; if (cur_len) { - wms_decode_address(str, "smsc", data, cur_len - 1); + wms_decode_address("smsc", data, cur_len - 1); data += cur_len; } @@ -291,7 +291,7 @@ static void cmd_wms_get_message_cb(struct qmi_dev *qmi, struct qmi_request *req, if (cur_len) { cur_len = (cur_len + 1) / 2; - wms_decode_address(str, sent ? "receiver" : "sender", data, cur_len); + wms_decode_address(sent ? "receiver" : "sender", data, cur_len); data += cur_len + 1; } -- 2.25.1