[Libvir] [PATCH] Fix string handling in virDomain{Get, Set}SchedulerParameters

Richard W.M. Jones rjones at redhat.com
Fri Jun 22 11:43:27 UTC 2007

Jim Meyering wrote:
> "Richard W.M. Jones" <rjones at redhat.com> wrote:
>> Let's try this updated patch.
> Hi Rich,
> It'd be nice to factor those "cap" and "weight" literal strings all
> the way out, so each is defined in exactly one place.
> Either with a file-scoped const declaration, e.g.,
>   static const char *cap_str = "cap";
> or a cpp define:
>   #define CAP_STR "cap";
> Then, there's no risk (however small) of changing
> one of the literal strings without changing its mate.

I've applied the patch + Jim's suggestion above.


Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070622/fcfed05e/attachment-0001.bin>

More information about the libvir-list mailing list