In article <e5721d0b-1b44-612e-a23c-ca5e2af52...@iij.ad.jp>,
Kengo NAKAHARA  <k-nakah...@iij.ad.jp> wrote:
>Hi,
>
>Thank you for your reviewing.


Thanks for fixing; more nit-picking:
1. there is a variable called err instead of error why (all the rest
   are called error)?
2. I prefer fewer lines of code, fewer variables for all the copies
   of those similar functions, like:

+static int
+if_ipsec_encap_detach(struct ipsec_variant *var)
+{
+
+       KASSERT(var != NULL);
+       KASSERT(if_ipsec_variant_is_configured(var));
+
+       switch (var->iv_psrc->sa_family) {
+#ifdef INET
+       case AF_INET:
+               return ipsecif4_detach(var);
+#endif /* INET */
+#ifdef INET6
+       case AF_INET6:
+               return ipsecif6_detach(var);
+               break;
+#endif /* INET6 */
+       default:
+               return EINVAL;
+       }
+}

Best,

christos

Reply via email to