|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] tools/xenstore/xenstored_control.c: correctly print time_t
On 12.04.23 11:01, Alexander Kanavin wrote:
I'd rather have something like:
diff --git a/tools/xenstore/xenstored_control.c
b/tools/xenstore/xenstored_control.c
index cbd62556c3..f9452d63b4 100644
--- a/tools/xenstore/xenstored_control.c
+++ b/tools/xenstore/xenstored_control.c
@@ -666,12 +666,12 @@ static const char *lu_reject_reason(const void *ctx)
time_t now = time(NULL);
list_for_each_entry(conn, &connections, list) {
- if (conn->ta_start_time &&
- (now - conn->ta_start_time >= lu_status->timeout)) {
+ unsigned long tdiff = now - conn->ta_start_time;
+
+ if (conn->ta_start_time && tdiff >= lu_status->timeout) {
ret = talloc_asprintf(ctx, "%s\nDomain %u: %ld s",
ret ? : "Domains with long
running transactions:",
- conn->id,
- now - conn->ta_start_time);
+ conn->id, tdiff);
}
}
Juergen
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |