shithub: riscv

Download patch

ref: c38c964ed92a6ee9e40d2b8fcfc95923b16280e8
parent: 69a3f67965aca6e8a5554c816319da92a82b3a1a
author: cinap_lenrek <[email protected]>
date: Fri Jan 6 14:27:23 EST 2023

devdraw: coding style (from drawterm)

--- a/sys/src/9/port/devdraw.c
+++ b/sys/src/9/port/devdraw.c
@@ -626,7 +626,7 @@
 		dscreen = this->next;
 		goto Found;
 	}
-	while(next = ds->next){	/* assign = */
+	while((next = ds->next) != nil){
 		if(next == this){
 			ds->next = this->next;
 			goto Found;
@@ -699,7 +699,7 @@
 		free(this);
 		return;
 	}
-	while(next = cs->next){	/* assign = */
+	while((next = cs->next) != nil){
 		if(next == this){
 			cs->next = this->next;
 			drawfreedscreen(this->dscreen);
@@ -723,7 +723,7 @@
 		drawfreedimage(d);
 		return;
 	}
-	while(next = d->next){	/* assign = */
+	while((next = d->next) != nil){
 		if(next->id == id){
 			d->next = next->next;
 			drawfreedimage(next);
@@ -1082,7 +1082,7 @@
 	if(QID(c->qid) == Qctl)
 		cl->busy = 0;
 	if((c->flag&COPEN) && (decref(&cl->r)==0)){
-		while(r = cl->refresh){	/* assign = */
+		while((r = cl->refresh) != nil){
 			cl->refresh = r->next;
 			free(r);
 		}