lxc: fix logic bug

Detected by Coverity.  We want to increment the size_t counter,
not the pointer to the counter.  Bug present since 5f5c6fde (0.9.5).

* src/lxc/lxc_controller.c (lxcSetupLoopDevices): Use correct
precedence.
This commit is contained in:
Eric Blake 2011-10-07 20:42:36 -06:00
parent d5c4067d7b
commit 2e593ba518

View File

@ -210,7 +210,7 @@ static int lxcSetupLoopDevices(virDomainDefPtr def, size_t *nloopDevs, int **loo
virReportOOMError();
goto cleanup;
}
(*loopDevs)[*nloopDevs++] = fd;
(*loopDevs)[(*nloopDevs)++] = fd;
}
VIR_DEBUG("Setup all loop devices");