mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Use g_steal_pointer where possible
Via coccinelle (not the handbag!) spatches used: @ rule1 @ identifier a, b; symbol NULL; @@ - b = a; ... when != a - a = NULL; + b = g_steal_pointer(&a); @@ - *b = a; ... when != a - a = NULL; + *b = g_steal_pointer(&a); Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
committed by
Ján Tomko
parent
cb29e4e801
commit
155151a3d0
@@ -116,8 +116,7 @@ static struct Arguments *parseArguments(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
ret = args;
|
||||
args = NULL;
|
||||
ret = g_steal_pointer(&args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user