From aa328d34de2e6c0a8434ac4596344788539a3702 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
Date: Mon, 26 Dec 2022 11:11:32 +0800
Subject: [PATCH] rollback strprint code modified

Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
---
 src/lxc/confile_utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/confile_utils.h b/src/lxc/confile_utils.h
index 3655ec4..62990e9 100644
--- a/src/lxc/confile_utils.h
+++ b/src/lxc/confile_utils.h
@@ -13,7 +13,7 @@
 		if (str)                                                \
 			len = snprintf(str, inlen, ##__VA_ARGS__);      \
 		else                                                    \
-			len = 0; \
+			len = snprintf((char *){""}, 0, ##__VA_ARGS__); \
 		if (len < 0) {                                          \
 			SYSERROR("failed to create string");            \
 			return -1;                                      \
-- 
2.25.1

