
On Thu, Jan 30, 2014 at 10:55:58AM +0100, Cédric Bosdonnat wrote:
--- src/lxc/lxc_native.c | 43 ++++++++++++++++++++++++++ tests/lxcconf2xmldata/lxcconf2xml-idmap.config | 5 +++ tests/lxcconf2xmldata/lxcconf2xml-idmap.xml | 28 +++++++++++++++++ tests/lxcconf2xmltest.c | 1 + 4 files changed, 77 insertions(+) create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-idmap.config create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-idmap.xml
+ + if (type == 'u') { + if (VIR_EXPAND_N(def->idmap.uidmap, def->idmap.nuidmap, 1) < 0) + return -1; + idmap = &def->idmap.uidmap[def->idmap.nuidmap - 1]; + } else if (type == 'g') { + if (VIR_EXPAND_N(def->idmap.gidmap, def->idmap.ngidmap, 1) < 0) + return -1; + idmap = &def->idmap.gidmap[def->idmap.ngidmap - 1]; + } else + return -1;
Style nit-pick - when one part of an if/else has {}, then all parts should have {}. ACK with style nitpick. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|