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

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

 



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

Rich.

--
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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]