Explorar o código

Client: Simplify UA_Client_getContext

Julius Pfrommer %!s(int64=6) %!d(string=hai) anos
pai
achega
52d1cf2d2d
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  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;
 }