Commit 9191ef70e22ec8e6eb102c55147b47ce49a2b633

Edward Thomson 2021-08-30T08:40:26

error: don't check string after assert

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/errors.c b/src/errors.c
index 3d1d1c9..ce883b2 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -107,11 +107,6 @@ int git_error_set_str(int error_class, const char *string)
 
 	GIT_ASSERT_ARG(string);
 
-	if (!string) {
-		git_error_set(GIT_ERROR_INVALID, "unspecified caller error");
-		return -1;
-	}
-
 	git_buf_clear(buf);
 	git_buf_puts(buf, string);