From: tb Date: Wed, 8 Feb 2023 20:10:34 +0000 (+0000) Subject: iked: remove another unused variable X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2eafc8b460afa5d8478985018cd4ba419c20956f;p=openbsd iked: remove another unused variable It is not entirely obvious if some logic was forgotten or if that variable was added for debug logging or... Be that as it may, as tobhe points out, this variable has been unused since the initial import of iked. The logic seems sound without it, so it has never served a purpose and can go. ok tobhe --- diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index 9579b8a2ea5..d35fcc5520e 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.361 2022/12/06 09:07:33 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.362 2023/02/08 20:10:34 tb Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -3024,7 +3024,7 @@ ikev2_handle_delete(struct iked *env, struct iked_message *msg, uint64_t spi64, spi = 0; uint32_t spi32; uint8_t *buf; - size_t found = 0, failed = 0; + size_t found = 0; int ret = -1; size_t i, sz, cnt, len; @@ -3091,9 +3091,7 @@ ikev2_handle_delete(struct iked *env, struct iked_message *msg, } if (ikev2_childsa_delete(env, sa, msg->msg_del_protoid, spi, - &localspi[i], 0) == -1) - failed++; - else { + &localspi[i], 0) != -1) { found++; /* append SPI to log buffer */