Replace 'DIAGNOSTIC' block within soqinsque() by KASSERT(9).
authormvs <mvs@openbsd.org>
Wed, 27 Oct 2021 13:41:09 +0000 (13:41 +0000)
committermvs <mvs@openbsd.org>
Wed, 27 Oct 2021 13:41:09 +0000 (13:41 +0000)
ok sashan@

sys/kern/uipc_socket2.c

index 59229ef..66c7656 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uipc_socket2.c,v 1.114 2021/10/24 07:02:47 visa Exp $ */
+/*     $OpenBSD: uipc_socket2.c,v 1.115 2021/10/27 13:41:09 mvs Exp $  */
 /*     $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $       */
 
 /*
@@ -216,10 +216,7 @@ soqinsque(struct socket *head, struct socket *so, int q)
 {
        soassertlocked(head);
 
-#ifdef DIAGNOSTIC
-       if (so->so_onq != NULL)
-               panic("soqinsque");
-#endif
+       KASSERT(so->so_onq == NULL);
 
        so->so_head = head;
        if (q == 0) {