gadget: Fix getopt returning value
authorPawel Szewczyk <p.szewczyk@samsung.com>
Fri, 3 Jul 2015 10:30:31 +0000 (12:30 +0200)
committerPawel Szewczyk <p.szewczyk@samsung.com>
Tue, 7 Jul 2015 12:26:28 +0000 (14:26 +0200)
Both getopt and getopt_long return int and this is the type we should
use here.

Change-Id: I16a7003e389c255ab2111e95d7cb84b7ca9065e2
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
source/gadget/src/gadget.c

index 52060ca..ebe5ae8 100644 (file)
@@ -384,7 +384,7 @@ static void gt_parse_gadget_disable(const Command *cmd, int argc,
                char **argv, ExecutableCommand *exec, void * data)
 {
        struct gt_gadget_disable_data *dt;
-       char c;
+       int c;
        struct option opts[] = {
                {"udc", required_argument, 0, 'u'},
                {"help", no_argument, 0, 'h'},
@@ -474,7 +474,7 @@ static int gt_gadget_load_help(void *data)
 static void gt_parse_gadget_load(const Command *cmd, int argc,
                char **argv, ExecutableCommand *exec, void * data)
 {
-       char c;
+       int c;
        struct gt_gadget_load_data *dt;
        struct option opts[] = {
                {"off", no_argument, 0, 'o'},