Pārlūkot izejas kodu

Restrict the visibility of these two to the TU

No need to make these global

Before
$ nm ./CMakeFiles/open62541-plugins.dir/plugins/ua_config_default.c.o
000000000000089d t addDefaultNetworkLayers
...
0000000000000000 D usernamePasswords
0000000000000060 R usernamePasswordsSize

After
$ nm ./CMakeFiles/open62541-plugins.dir/plugins/ua_config_default.c.o
0000000000000000 d usernamePasswords
0000000000000060 r usernamePasswordsSize
Frank Meerkoetter 6 gadi atpakaļ
vecāks
revīzija
e32595ecc4
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      plugins/ua_config_default.c

+ 2 - 2
plugins/ua_config_default.c

@@ -97,8 +97,8 @@ UA_ServerConfig_set_customHostname(UA_ServerConfig *config, const UA_String cust
     UA_String_copy(&customHostname, &config->customHostname);
 }
 
-const size_t usernamePasswordsSize = 2;
-UA_UsernamePasswordLogin usernamePasswords[2] = {
+static const size_t usernamePasswordsSize = 2;
+static UA_UsernamePasswordLogin usernamePasswords[2] = {
     {UA_STRING_STATIC("user1"), UA_STRING_STATIC("password")},
     {UA_STRING_STATIC("user2"), UA_STRING_STATIC("password1")}};