On Wed, 2018-03-07 at 09:34 +0000, David Woodhouse wrote: > > Maybe we should pass the xmlNode into add_option() not a string? Then > it's nice and simple. And more xmlnode_get_text() invocations can turn > into simple xmlnode_is_named()? The above code becomes > > ????????for (xml_node = xml_node->children; xml_node; xml_node=xml_node->next) { > ????????????????if (!xmlnode_is_named(xml_node, "ip-address")) > ????????????????????????vpninfo->ip_info.addr = add_option(vpninfo, "ipaddr", xml_node); There's a problem with that suggestion if xmlNodeGetContent() on the node returns NULL. Previously, xmlnode_get_text() would fail on that one, while xmlnode_is_named() would have matched it. Is that a thing that can actually happen? Do we need to cope gracefully, or merely make sure we don't crash?? -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5213 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20180307/b36dda84/attachment.bin>