Commit Diff


commit - a53692a957efbbbba0b5c35d09dd6c401035c5ac446d0f4611e2be538c3692f9
commit + 1e77374764c1364e5046de218e02281841d1bea4ebfef115ff8fcb1517afe21e
blob - 0a0ce7a9ae4cfe8bbd2f27c9b5d698bf4c2083b123025460d40c93d848e635f2
blob + ca2c4df18b2ae9208bf90ff344549f63710729756d2c7683decd88456c935599
--- lib/diff.c	
+++ lib/diff.c	
@@ -118,11 +118,9 @@ get_diffstat(struct got_diffstat_cb_arg *ds, const cha
 	err = got_pathlist_insert(&pe, ds->paths, path, change);
 	if (err || pe == NULL) {
 		free(change);
-		if (err)
-			return err;
+		return err;
 	}
 
-	pe = RB_MAX(got_pathlist_head, ds->paths);
 	diffstat_field_width(&ds->max_path_len, &ds->add_cols, &ds->rm_cols,
 	    pe->path_len, change->add, change->rm);