[strongSwan-dev] [RFC PATCH] Fix missing pointer dereference

Thomas Jarosch thomas.jarosch at intra2net.com
Thu Dec 4 11:10:23 CET 2014


actually the use of "if (first)" looks wrong to me, too.

cppcheck reported:
[src/libcharon/sa/ikev2/tasks/ike_cert_pre.c:237]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
---
 src/libcharon/sa/ikev2/tasks/ike_cert_pre.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcharon/sa/ikev2/tasks/ike_cert_pre.c b/src/libcharon/sa/ikev2/tasks/ike_cert_pre.c
index 0dac975..dacc743 100644
--- a/src/libcharon/sa/ikev2/tasks/ike_cert_pre.c
+++ b/src/libcharon/sa/ikev2/tasks/ike_cert_pre.c
@@ -234,7 +234,7 @@ static void process_x509(cert_payload_t *payload, auth_cfg_t *auth,
 			DBG1(DBG_IKE, "received hash-and-url for end entity cert \"%s\"",
 				 url);
 			auth->add(auth, AUTH_HELPER_SUBJECT_HASH_URL, url);
-			first = FALSE;
+			*first = FALSE;
 		}
 		else
 		{
-- 
1.9.3



More information about the Dev mailing list