shithub: neindaw

Download patch

ref: 8747033fb429a67053e229b30c323ce1c5a25a54
parent: 655a5655af3bd3549bd6a8fc22e6b882aae3d533
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Jan 13 13:11:17 EST 2021

fix a warning on 386

--- a/util.c
+++ b/util.c
@@ -70,15 +70,16 @@
 		return nsec() - xstart;
 
 	if(fasthz == 0){
-		if((fasthz = _tos->cyclefreq) == 0){
+		fasthz = _tos->cyclefreq;
+		if(fasthz == 0){
 			fasthz = ~0ULL;
 			xstart = nsec();
 			fprint(2, "cyclefreq not available, falling back to nsec()\n");
 			fprint(2, "you might want to disable aux/timesync\n");
 			return 0;
-		}else{
-			cycles(&xstart);
 		}
+		cycles(&xstart);
+		return 0;
 	}
 	cycles(&x);
 	x -= xstart;