[Libguestfs] [PATCH] isoinfo: remove the useless goto

Wanlong Gao gaowanlong at cn.fujitsu.com
Mon Jul 16 09:06:45 UTC 2012


On 07/16/2012 04:12 PM, Richard W.M. Jones wrote:
> On Mon, Jul 16, 2012 at 04:03:57PM +0800, Wanlong Gao wrote:
>> Code cleanup.
>>
>> Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
>> ---
>>  daemon/isoinfo.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c
>> index c0ee1c9..fd777bd 100644
>> --- a/daemon/isoinfo.c
>> +++ b/daemon/isoinfo.c
>> @@ -255,8 +255,6 @@ isoinfo (const char *path)
>>      goto done;
>>  
>>    ret = parse_isoinfo (lines);
>> -  if (ret == NULL)
>> -    goto done;
>>  
>>   done:
>>    free (out);
> 
> The goto helps maintenance.  In future we might add more lines between
> the 'goto' and the 'done:' label.  In any case, the compiler can
> easily work out that this is useless and optimize it away.

Got it, thank you.

Wanlong Gao

> 
> Rich.
> 





More information about the Libguestfs mailing list