OSDN Git Service

tools: Fix using old-style initializers
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Fri, 10 Feb 2012 21:39:49 +0000 (18:39 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 14 Feb 2012 12:28:58 +0000 (14:28 +0200)
tools/hcitool.c
tools/rfcomm.c

index 5189d8d..66e5c20 100644 (file)
@@ -74,7 +74,7 @@ static void usage(void);
 
 static int dev_info(int s, int dev_id, long arg)
 {
-       struct hci_dev_info di = { dev_id: dev_id };
+       struct hci_dev_info di = { .dev_id = dev_id };
        char addr[18];
 
        if (ioctl(s, HCIGETDEVINFO, (void *) &di))
index 6800445..e73b0ba 100644 (file)
@@ -673,7 +673,7 @@ static void cmd_show(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv)
        if (strcmp(argv[0], "all") == 0)
                print_dev_list(ctl, 0);
        else {
-               struct rfcomm_dev_info di = { id: atoi(argv[0]) };
+               struct rfcomm_dev_info di = { .id = atoi(argv[0]) };
                if (ioctl(ctl, RFCOMMGETDEVINFO, &di) < 0) {
                        perror("Get info failed");
                        exit(1);