[libvirt] [PATCH] domtop: Turn parse_argv into void

Ján Tomko jtomko at redhat.com
Mon Aug 4 13:02:14 UTC 2014


On 08/04/2014 02:57 PM, Michal Privoznik wrote:
> Currently, the function follows the usual pattern used in our code:
> 
>   int ret = -1;
>   ...
>   ret = 0;
>  cleanup:
>   return ret;
> 
> However, the function always call exit() on error, so the cleanup
> label is never jumped onto. Therefore, it doesn't make any sense to
> have the parse_argv function return an integer value, if it
> effectively can return only value of zero.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  examples/domtop/domtop.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 

ACK

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140804/383eca48/attachment-0001.sig>


More information about the libvir-list mailing list