瀏覽代碼

Client: Simplify UA_Client_getContext

Julius Pfrommer 6 年之前
父節點
當前提交
52d1cf2d2d
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      include/ua_client.h

+ 1 - 3
include/ua_client.h

@@ -66,9 +66,7 @@ UA_Client_getConfig(UA_Client *client);
 /* Get the client context */
 static UA_INLINE void *
 UA_Client_getContext(UA_Client *client) {
-    UA_ClientConfig *config = UA_Client_getConfig(client);
-    if(!config)
-        return NULL;
+    UA_ClientConfig *config = UA_Client_getConfig(client); /* Cannot fail */
     return config->clientContext;
 }