Commit d0c4e49e831f98e5984cc1e96ce47b8ad9bc038f

Stefan Sperling 2019-08-19T12:12:30

remove pointless offset variable in get_blamed_line()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/blame.c b/lib/blame.c
index bff96a6..df12bfb 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -125,12 +125,11 @@ get_blamed_line(struct got_blame_diff_offsets_list *diff_offsets_list,
     int lineno)
 {
 	struct got_blame_diff_offsets *diff_offsets;
-	int offset = 0;
 
 	SLIST_FOREACH(diff_offsets, diff_offsets_list, entry)
 		lineno = got_diffoffset_get(diff_offsets->chunks, lineno);
 
-	return lineno + offset;
+	return lineno;
 }
 
 static const struct got_error *