Re: unnecessary "if-before-free" tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 21, 2008 at 06:53:52PM +0100, Jim Meyering wrote:
> Hi Dan,
> 
> I noticed a few new unnecessary "if-before-free" tests:
> 
>   src/storage_backend.c:2591: if (groups[j]) free(groups[j]);
>   src/storage_backend_iscsi.c:    if (devpath) free(devpath);
>   src/storage_backend_iscsi.c:    if (portal) free(portal);
>   src/storage_backend_iscsi.c:    if (session) free(session);

There's a hell of alot more than those 4 in the storage code - most are 
2-liners. I'll kill them all off.

> If no one objects, I'm going to remove them
> and add a build-time test to ensure they stay gone.

Fine with me.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]