shithub: riscv

Download patch

ref: dfb4b522830edab8f3856289d326d6cf5e930644
parent: 61f4c085c402af665b436f6d010d61107551d8a3
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Oct 1 13:04:51 EDT 2023

git/save: fix warning

--- a/sys/src/cmd/git/save.c
+++ b/sys/src/cmd/git/save.c
@@ -201,9 +201,8 @@
 int
 tracked(char *path)
 {
-	int lo, hi, mid, r;
+	int r, lo, hi, mid;
 
-	r = -1;
 	lo = 0;
 	hi = nidx-1;
 	while(lo <= hi){
@@ -214,9 +213,9 @@
 		else if(r > 0)
 			lo = mid+1;
 		else
-			break;
+			return idx[mid].state != 'R';
 	}
-	return r == 0 && idx[mid].state != 'R';
+	return 0; 
 }
 
 int