uqmi_add_command: fixed command argument assignment master
authorCarlo Lobrano <c.lobrano@gmail.com>
Thu, 22 Jun 2017 07:40:37 +0000 (09:40 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 24 May 2018 07:47:36 +0000 (09:47 +0200)
The char *arg passed to uqmi_add_command was not assigned to cmd[idx].arg.

Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
commands.c

index f9545a9..8e9810d 100644 (file)
@@ -193,7 +193,7 @@ void uqmi_add_command(char *arg, int cmd)
 
        cmds = realloc(cmds, n_cmds * sizeof(*cmds));
        cmds[idx].handler = &uqmi_cmd_handler[cmd];
-       cmds[idx].arg = optarg;
+       cmds[idx].arg = arg;
 }
 
 static void uqmi_print_result(struct blob_attr *data)