diff mbox series

xenstored: use correct conversion specifier in the tracing function

Message ID 20231120175357.219142-1-volodymyr_babchuk@epam.com (mailing list archive)
State New, archived
Headers show
Series xenstored: use correct conversion specifier in the tracing function | expand

Commit Message

Volodymyr Babchuk Nov. 20, 2023, 5:54 p.m. UTC
Previous change to xenstored used "%d" to format conn->id while in fact
conn->id has "unsigned int" type, so "%u" should be used.

Fixes: 97f8555acbf3 ("xenstored: print domain id in traces")
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 tools/xenstored/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jürgen Groß Nov. 21, 2023, 6:50 a.m. UTC | #1
On 20.11.23 18:54, Volodymyr Babchuk wrote:
> Previous change to xenstored used "%d" to format conn->id while in fact
> conn->id has "unsigned int" type, so "%u" should be used.
> 
> Fixes: 97f8555acbf3 ("xenstored: print domain id in traces")
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
diff mbox series

Patch

diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index 311764eb0c..184b130d12 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -135,7 +135,7 @@  static void trace_io(const struct connection *conn,
 	now = time(NULL);
 	tm = localtime(&now);
 
-	trace("io: %s %p (d%d) %04d%02d%02d %02d:%02d:%02d %s (",
+	trace("io: %s %p (d%u) %04d%02d%02d %02d:%02d:%02d %s (",
 	      out ? "OUT" : "IN", conn, conn->id,
 	      tm->tm_year + 1900, tm->tm_mon + 1,
 	      tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec,