[Libvir] fix another bug exposed by a compiler warning

Mark McLoughlin markmc at redhat.com
Mon Mar 3 16:41:06 UTC 2008


On Mon, 2008-03-03 at 17:35 +0100, Jim Meyering wrote:

> -    virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage[0] : NULL));
> +    virerr = __virErrorMsg(code, (!errorMessage[0] ? errorMessage : NULL));

	That can't be right, surely? You mean:

  (errorMessage[0] ? errorMessage : NULL)

	right?

	(Otherwise you'd only ever be passing "" or NULL to virErrorMsg)

Cheers,
Mark.




More information about the libvir-list mailing list