Re: [PATCH 3/6] lxc: Converting full string entries in types only.

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

 



Hi John,

I'm seeing clang warnings after applying patches.
Clang is complaining about this line:

> -    if (STREQ(name, "lxc.network.type")) {
> +    if (STREQ(name, "type")) {
>          virDomainDefPtr def = parseData->def;

I think it is irrelevant because there is no way to get a NULL pointer
from case structure.
During my tests, I'm being redirected to "Unhandled network property".
Technically, only lxcNetworkParseDataSuffix is using this method.
Btw, here is a possible fix for that...

--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -612,7 +612,7 @@ lxcNetworkParseDataIPs(const char *name,
     if (VIR_ALLOC(ip) < 0)
         return -1;

-    if (STREQ(name, "ipv6"))
+    if (STREQ_NULLABLE(name, "ipv6"))
         family = AF_INET6;

     ipparts = virStringSplit(value->str, "/", 2);

--
Julio Cesar Faracco

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