static ns_t *ns_fromkvs (flux_t h) { JSON o = NULL; ns_t *ns = NULL; if (kvs_get_obj (h, "conf.live.status", &o) < 0) goto done; ns = ns_fromjson (o); done: Jput (o); return ns; }
static ns_t *ns_fromkvs (flux_t h) { char *json_str = NULL; ns_t *ns = NULL; if (kvs_get (h, "conf.live.status", &json_str) < 0) goto done; ns = ns_fromjson (json_str); done: if (json_str) free (json_str); return ns; }