Joan Lledó, le jeu. 02 mai 2019 11:55:02 +0200, a ecrit:
> +  uint16_t oldflags;
> +  struct if_change_flags_args *args = (struct if_change_flags_args *) arg;

In C, there is no need to explicit the cast from void*.

> +  ifc = netif_get_state (args->netif);
> +
> +  if (ifc == NULL)
> +    {
> +      /* The user provided no interface */
> +      errno = EINVAL;

Errno is a per-thread variable, you can not propagate the error this
way. You can for instance add an int field to if_change_flags_args, to
read it from if_change_flags and freeing it there.

Samuel

Reply via email to