提交 1401f46b 编写于 作者: C Carlos Rica 提交者: Junio C Hamano

Use const qualifier for 'sha1' parameter in delete_ref function

delete_ref function does not change the 'sha1' parameter. Non-const pointer
causes a compiler warning if you call to the function using a const argument.
Signed-off-by: NCarlos Rica <jasampler@gmail.com>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 ab602941
......@@ -213,7 +213,7 @@ struct lock_file {
extern int hold_lock_file_for_update(struct lock_file *, const char *path, int);
extern int commit_lock_file(struct lock_file *);
extern void rollback_lock_file(struct lock_file *);
extern int delete_ref(const char *, unsigned char *sha1);
extern int delete_ref(const char *, const unsigned char *sha1);
/* Environment bits from configuration mechanism */
extern int use_legacy_headers;
......
......@@ -705,7 +705,7 @@ static int repack_without_ref(const char *refname)
return commit_lock_file(&packlock);
}
int delete_ref(const char *refname, unsigned char *sha1)
int delete_ref(const char *refname, const unsigned char *sha1)
{
struct ref_lock *lock;
int err, i, ret = 0, flag = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册