[libvirt] PATCH: 17/28: Reduce return paths in OpenVZ driver

Daniel Veillard veillard at redhat.com
Wed Dec 3 10:20:03 UTC 2008


On Sun, Nov 30, 2008 at 11:58:50PM +0000, Daniel P. Berrange wrote:
> This patch reduces the number of exit paths in the OpenVZ driver methods

[...]
> +#define PROGRAM_SENTINAL ((char *)0x1)
> +static void openvzSetProgramSentinal(const char **prog, const char *key)
> +{
> +    const char **tmp = prog;
> +    while (tmp && *tmp) {
> +        if (*tmp == PROGRAM_SENTINAL) {
> +            *tmp = key;
> +            break;
> +        }
> +        tmp++;
> +    }
> +}
  okay, it's a bit weird, maybe a small comment like

/*
 * used to update the command line when the domain parameter name is
 * known.
 */
would help people trying to read the code :-)

[...]

  fine by me, +1

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list