]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/libs/store: use single_with_domid() in xs_get_domain_path()
authorJuergen Gross <jgross@suse.com>
Mon, 10 Mar 2025 08:52:54 +0000 (09:52 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 10 Mar 2025 08:52:54 +0000 (09:52 +0100)
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>
tools/libs/store/xs.c

index e22f99b59f612054910d366c8b8c6b791c0fa6a9..cf3266807ff5d75cf1c8285aec324c6e8407f283 100644 (file)
@@ -1345,11 +1345,7 @@ bool xs_resume_domain(struct xs_handle *h, unsigned int domid)
 
 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)