In article <[email protected]>,
Kengo NAKAHARA <[email protected]> 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