[Libvir] [RFC] 2/3 Config functions for managing linux containers

Daniel P. Berrange berrange at redhat.com
Thu Feb 21 14:45:00 UTC 2008


On Wed, Feb 20, 2008 at 10:25:11PM -0800, Dave Leskovec wrote:
> This patch contains the new files lxc_conf.c and lxc_conf.h

This looks pretty good to me - you follow all our coding conventions
and use all the appropriate utility / helper functions.  Only thing
I ca nfind to comment on so far is:

> +lxc_vm_t *lxcFindVMByName(const lxc_driver_t *driver,
> +                          const char *name)
> +{
> +    lxc_vm_t *vm;
> +
> +    for (vm = driver->vms; vm; vm = vm->next) {
> +        if (!strcmp(vm->def->name, name)) {
> +            return vm;
> +        }
> +    }
> +
> +    return NULL;
> +}

Use STREQ()  here instead of  !strcmp

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  -=| 




More information about the libvir-list mailing list