xs_get_domain_path() can be simplified by using single_with_domid().
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
char *xs_get_domain_path(struct xs_handle *h, unsigned int domid)
{
- char domid_str[MAX_STRLEN(domid)];
-
- snprintf(domid_str, sizeof(domid_str), "%u", domid);
-
- return xs_single(h, XBT_NULL, XS_GET_DOMAIN_PATH, domid_str, NULL);
+ return single_with_domid(h, XS_GET_DOMAIN_PATH, domid);
}
bool xs_path_is_subpath(const char *parent, const char *child)