Browse Source

Client: Simplify UA_Client_getContext

Julius Pfrommer 6 years ago
parent
commit
52d1cf2d2d
1 changed files with 1 additions and 3 deletions
  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;
 }