From: Felix Fietkau Date: Thu, 2 Oct 2014 09:42:15 +0000 (+0200) Subject: move a variable declaration to the right place X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;ds=sidebyside;h=b8e45d120ce97dd85e0fe13b4114593407da9973;p=project%2Fuqmi.git move a variable declaration to the right place Signed-off-by: Felix Fietkau --- 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; }