On 03/08/2018 07:20 AM, Marc Hartmayer wrote:
> The two code paths have some cleanup in common so lets refactor it.
> 
> Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com>
> ---
>  src/test/test_driver.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/src/test/test_driver.c b/src/test/test_driver.c
> index 2773f5c758c8..e7307fddad4a 100644
> --- a/src/test/test_driver.c
> +++ b/src/test/test_driver.c
> @@ -1306,6 +1306,7 @@ testOpenFromFile(virConnectPtr conn, const char *file)
>  static int
>  testOpenDefault(virConnectPtr conn)
>  {
> +    int ret;

So that no one ever adds a goto cleanup some day and @ret isn't set,
let's initialize to VIR_DRV_OPEN_ERROR (and remove that setting in the
error: label).

Reviewed-by: John Ferlan <jfer...@redhat.com>

John

[I'll continue with the rest tomorrow]

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to