[libvirt] [PATCH] virterror: supply missing spaces

Eric Blake eblake at redhat.com
Tue Nov 2 21:39:07 UTC 2010


* src/util/virterror.c (virErrorDomainName): Always supply
trailing space if category was present.
---

>> > > +++ b/src/util/virterror.c
>> > > @@ -190,6 +190,9 @@ static const char *virErrorDomainName(virErrorDomain domain) {
>> > >          case VIR_FROM_AUDIT:
>> > >              dom = "Audit";
>> > >              break;
>> > > +        case VIR_FROM_STREAMS:
>> > > +            dom = "Streams ";
> > 
> > In just this context, I wondered why the trailing space?  Then looking
> > at the entire file, I instead wonder: why are VIR_FROM_NWFILTER and
> > VIR_FROM_AUDIT the only ones that lack trailing space?
> Looks like a bug to me.

Then I'm pushing this under the trivial rule (okay, it's a bit of a
stretch, since the whitespace is significant as part of a string literal
rather than insignificant as in indentation, but I didn't think
anyone would mind :)

 src/util/virterror.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virterror.c b/src/util/virterror.c
index 70749a7..dc08aaa 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -179,7 +179,7 @@ static const char *virErrorDomainName(virErrorDomain domain) {
             dom = "CPU ";
             break;
         case VIR_FROM_NWFILTER:
-            dom = "Network Filter";
+            dom = "Network Filter ";
             break;
         case VIR_FROM_HOOK:
             dom = "Sync Hook ";
@@ -188,7 +188,7 @@ static const char *virErrorDomainName(virErrorDomain domain) {
             dom = "Domain Snapshot ";
             break;
         case VIR_FROM_AUDIT:
-            dom = "Audit";
+            dom = "Audit ";
             break;
     }
     return(dom);
-- 
1.7.2.3




More information about the libvir-list mailing list