]> xenbits.xensource.com Git - libvirt.git/commit
virTypedParameterAssignValueVArgs: Ensure proper typed param type in caller
authorPeter Krempa <pkrempa@redhat.com>
Tue, 18 Apr 2023 12:51:31 +0000 (14:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 May 2023 12:32:46 +0000 (14:32 +0200)
commitff8a626c58afd012a6cb90755e0851ac81525cc1
treecbf425874d4b9f2541c71ac43a89ad85dbc1b6c1
parent81391c0e1dbcf2f21d73928549fe6d319316a8c2
virTypedParameterAssignValueVArgs: Ensure proper typed param type in caller

There are two callers of virTypedParameterAssignValueVArgs.

- 'virTypedParameterAssignValue' always uses the correct type, thus
  doesn't need to be modified. Just use the proper type in the function
  declaration

- 'virTypedParameterAssign' can get improper type, but we can move the
  validation into it decreasing the scope in which failures need to be
  propagated.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virtypedparam.c