瀏覽代碼

Fix: Correct boolean check on input parameters

Thomas Jürges 4 年之前
父節點
當前提交
8268e5bb09
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
     }