OSDN Git Service

test: Fix re-declaration of "encrypt" symbol
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 5 Dec 2012 15:21:54 +0000 (17:21 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 5 Dec 2012 15:21:54 +0000 (17:21 +0200)
test/l2test.c:106:12: error: ‘encrypt’ redeclared as different kind of symbol
In file included from test/l2test.c:30:0:
/usr/include/unistd.h:1147:13: note: previous declaration of ‘encrypt’ was here

test/l2test.c
test/rctest.c

index c5b6efe..7f9f007 100644 (file)
@@ -103,7 +103,7 @@ static char *filename = NULL;
 static int rfcmode = 0;
 static int master = 0;
 static int auth = 0;
-static int encrypt = 0;
+static int encr = 0;
 static int secure = 0;
 static int socktype = SOCK_SEQPACKET;
 static int linger = 0;
@@ -336,7 +336,7 @@ static int do_connect(char *svr)
                opt |= L2CAP_LM_MASTER;
        if (auth)
                opt |= L2CAP_LM_AUTH;
-       if (encrypt)
+       if (encr)
                opt |= L2CAP_LM_ENCRYPT;
        if (secure)
                opt |= L2CAP_LM_SECURE;
@@ -471,7 +471,7 @@ static void do_listen(void (*handler)(int sk))
                opt |= L2CAP_LM_MASTER;
        if (auth)
                opt |= L2CAP_LM_AUTH;
-       if (encrypt)
+       if (encr)
                opt |= L2CAP_LM_ENCRYPT;
        if (secure)
                opt |= L2CAP_LM_SECURE;
@@ -1404,7 +1404,7 @@ int main(int argc, char *argv[])
                        break;
 
                case 'E':
-                       encrypt = 1;
+                       encr = 1;
                        break;
 
                case 'S':
index 417cb3f..58aa533 100644 (file)
@@ -80,7 +80,7 @@ static int save_fd = -1;
 
 static int master = 0;
 static int auth = 0;
-static int encrypt = 0;
+static int encr = 0;
 static int secure = 0;
 static int socktype = SOCK_STREAM;
 static int linger = 0;
@@ -205,7 +205,7 @@ static int do_connect(const char *svr)
                opt |= RFCOMM_LM_MASTER;
        if (auth)
                opt |= RFCOMM_LM_AUTH;
-       if (encrypt)
+       if (encr)
                opt |= RFCOMM_LM_ENCRYPT;
        if (secure)
                opt |= RFCOMM_LM_SECURE;
@@ -296,7 +296,7 @@ static void do_listen(void (*handler)(int sk))
                opt |= RFCOMM_LM_MASTER;
        if (auth)
                opt |= RFCOMM_LM_AUTH;
-       if (encrypt)
+       if (encr)
                opt |= RFCOMM_LM_ENCRYPT;
        if (secure)
                opt |= RFCOMM_LM_SECURE;
@@ -776,7 +776,7 @@ int main(int argc, char *argv[])
                        break;
 
                case 'E':
-                       encrypt = 1;
+                       encr = 1;
                        break;
 
                case 'S':