Skip to contentSkip to conversation

xenstore: dont increment bool variable

PATCH New Juergen Gross 2 participants 2 messages Apr 5, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xenstore: dont increment bool variable

Instead of incrementing a bool variable just set it to true.

---
 tools/xenstore/xenstored_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/xenstore/xenstored_domain.c +2 -1
index 4edd14eb4f..f41cf46ced 100644
@@ -934,7 +934,8 @@ void wrl_apply_debit_actual(struct domain *domain)
 	      (long)domain->wrl_credit, (long)wrl_reserve);
 
 	if (domain->wrl_credit < 0) {
-		if (!domain->wrl_delay_logged++) {
+		if (!domain->wrl_delay_logged) {
+			domain->wrl_delay_logged = true;
 			WRL_LOG(now, "domain %ld is affected",
 				(long)domain->domid);
 		} else if (!wrl_log_last_warning) {
Signature · 7 lines
2.12.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

PATCH 1/1 xenstore: dont increment bool variable

Juergen Gross writes ("[PATCH] xenstore: dont increment bool variable"):

Quoted 1 line

Instead of incrementing a bool variable just set it to true.

I will commit this to staging. Also, I will squash it into the XSA206 fixes as I push them to the stable branches.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel