[LTP] [PATCH v3 4/6] Add rtnetlink helper library
Cyril Hrubis
chrubis@suse.cz
Wed May 5 14:16:36 CEST 2021
Hi!
> > +int tst_rtnl_add_message(const char *file, const int lineno,
> > + struct tst_rtnl_context *ctx, const struct nlmsghdr *header,
> > + const void *payload, size_t payload_size)
> > +{
> > + size_t size;
> > + unsigned int extra_flags = 0;
> > +
> > + if (!tst_rtnl_grow_buffer(file, lineno, ctx, NLMSG_SPACE(payload_size)))
> Shouldn't there be an error message?
> Or maybe at tst_rtnl_grow_buffer() on if (!buf)
As far as I can tell we will get error message from the safe_realloc()
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Nice code, thanks!
>
> Kind regards,
> Petr
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list