Skip to contentSkip to conversation

tools/libs/store: use single_with_domid() in xs_get_domain_path()

PATCH In review Juergen Gross 2 participants 2 messages Mar 5, 2025 – Mar 6, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/libs/store: use single_with_domid() in xs_get_domain_path()

xs_get_domain_path() can be simplified by using single_with_domid().

---
 tools/libs/store/xs.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
tools/libs/store/xs.c +1 -5
index e22f99b59f..cf3266807f 100644
@@ -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)
Signature · 1 line
2.43.0