[PATCH v3 2/5] vhost: make use of FD manager init function
Stephen Hemminger
stephen at networkplumber.org
Tue Apr 9 18:38:16 CEST 2024
On Tue, 9 Apr 2024 13:48:42 +0200
Maxime Coquelin <maxime.coquelin at redhat.com> wrote:
> -void
> +int
> fdset_init(struct fdset *pfdset)
> {
> int i;
>
> if (pfdset == NULL)
> - return;
> + return -1;
This test is unnecessary. The function is not exported, and therefore
can only be called from vhost library. And all call sites are passing
a pointer to local data.
Adding extra parameter checks to internal functions bloats code
and creates lots of untestable paths. Coverity might even be
smart enough to detect these.
More information about the dev
mailing list