[PATCH 2/4] libxl: fix empty string check for channel path

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

 



The libxl code was checking that a 'char *' was != '\0', instead
of checking the first element in the string

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/libxl/libxl_domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 57ec661..ea28c93 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -1121,7 +1121,7 @@ libxlDomainCreateChannelPTY(virDomainDefPtr def, libxl_ctx *ctx)
                                            &channelinfo);
 
         if (!ret && channelinfo.u.pty.path &&
-            channelinfo.u.pty.path != '\0') {
+            *channelinfo.u.pty.path != '\0') {
                 VIR_FREE(chr->source->data.file.path);
                 ignore_value(VIR_STRDUP(chr->source->data.file.path,
                                         channelinfo.u.pty.path));
-- 
2.9.3

--
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]
  Powered by Linux