[PATCH] Replace virBufferAdd with virBufferAddLit for const string

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


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