[libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

Michal Privoznik mprivozn at redhat.com
Thu Apr 18 12:27:09 UTC 2019


On 4/17/19 5:58 PM, Cole Robinson wrote:
 > <snip/>
> virDomainNetModeTypeFromString is just virEnumFromString which doesn't
> deference NULL
> 
> int
> 
> virEnumFromString(const char * const *types,
> 
>                    unsigned int ntypes,
> 
>                    const char *type)
> 
> {
> 
>      size_t i;
> 
>      if (!type)
> 
>          return -1;
> 

Ah, I somehow missed that. Yep, your code was right from the beginning. 
Sorry for the noise.

Michal




More information about the libvir-list mailing list