Commit 462865d7025807beab1323f85ceb055ed9ea2bfb

Michał Górny 2015-05-24T13:18:30

cred_helpers: Add 'const' qualifiers to git_cred_userpass_payload Make both username & password in git_cred_userpass_payload 'const'. The values are not altered anywhere, and the extra qualifier allows clients to assign 'const' values there.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/include/git2/cred_helpers.h b/include/git2/cred_helpers.h
index 1d88092..840c225 100644
--- a/include/git2/cred_helpers.h
+++ b/include/git2/cred_helpers.h
@@ -22,8 +22,8 @@ GIT_BEGIN_DECL
  * Payload for git_cred_stock_userpass_plaintext.
  */
 typedef struct git_cred_userpass_payload {
-	char *username;
-	char *password;
+	const char *username;
+	const char *password;
 } git_cred_userpass_payload;