Explorar o código

Fix: Correct boolean check on input parameters

Thomas Jürges %!s(int64=4) %!d(string=hai) anos
pai
achega
8268e5bb09
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/pubsub/tutorial_pubsub_subscribe.c

+ 1 - 1
examples/pubsub/tutorial_pubsub_subscribe.c

@@ -38,7 +38,7 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData);
 static void
 addPubSubConnection(UA_Server *server, UA_String *transportProfile,
                     UA_NetworkAddressUrlDataType *networkAddressUrl) {
-    if((server == NULL) && (transportProfile == NULL) &&
+    if((server == NULL) || (transportProfile == NULL) ||
         (networkAddressUrl == NULL)) {
         return;
     }