[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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

Jim Meyering wrote:
"Richard W.M. Jones" <rjones 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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]