wsman-client: account for null options and remove duplicate null check
Fix one more place where options pointer can be NULL.
Remove duplicated NULL check (seems like a merge problem).
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
diff --git a/src/lib/wsman-client.c b/src/lib/wsman-client.c
index 1ec5801..4fea28f 100644
--- a/src/lib/wsman-client.c
+++ b/src/lib/wsman-client.c
@@ -1217,10 +1217,7 @@
return NULL;
}
/* %f default precision is 6 -> [-]ddd.ddd */
- if (node == NULL) {
- return NULL;
- }
- snprintf(buf, 20, "PT%fS", options->expires);
+ snprintf(buf, 20, "PT%fS", (options) ? options->expires : 0);
ws_xml_add_child(node, XML_NS_EVENTING, WSEVENT_EXPIRES, buf);
if(data) {
if(((char *)data)[0] != 0)