[libvirt] [PATCH] Replace virBufferAdd with virBufferAddLit for const string

Daniel P. Berrange berrange at redhat.com
Wed Oct 19 08:45:38 UTC 2011


From: "Daniel P. Berrange" <berrange at redhat.com>

The statement

        virBufferAdd(buf, "''", 2);

triggers a syntax-check warning

* src/util/buf.c: Replace virBufferAdd with virBufferAddLit
---
 src/util/buf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Pushed as a build-breaker fix

diff --git a/src/util/buf.c b/src/util/buf.c
index b7fcf6d..5893e11 100644
--- a/src/util/buf.c
+++ b/src/util/buf.c
@@ -520,7 +520,7 @@ virBufferEscapeShell(virBufferPtr buf, const char *str)
             return;
         }
     } else {
-        virBufferAdd(buf, "''", 2);
+        virBufferAddLit(buf, "''");
         return;
     }
 
-- 
1.7.6.4




More information about the libvir-list mailing list