Skip to content

Commit

Permalink
Constness tightening for move/link_temp_to_file()
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Sep 1, 2006
1 parent 1d3fc68 commit 839837b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l
extern int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
size_t bufsize, size_t *bufposn);
extern int write_sha1_to_fd(int fd, const unsigned char *sha1);
extern int move_temp_to_file(const char *tmpfile, char *filename);
extern int move_temp_to_file(const char *tmpfile, const char *filename);

extern int has_sha1_pack(const unsigned char *sha1);
extern int has_sha1_file(const unsigned char *sha1);
Expand Down
4 changes: 2 additions & 2 deletions sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ char *write_sha1_file_prepare(void *buf,
*
* Returns the errno on failure, 0 on success.
*/
static int link_temp_to_file(const char *tmpfile, char *filename)
static int link_temp_to_file(const char *tmpfile, const char *filename)
{
int ret;
char *dir;
Expand Down Expand Up @@ -1381,7 +1381,7 @@ static int link_temp_to_file(const char *tmpfile, char *filename)
/*
* Move the just written object into its final resting place
*/
int move_temp_to_file(const char *tmpfile, char *filename)
int move_temp_to_file(const char *tmpfile, const char *filename)
{
int ret = link_temp_to_file(tmpfile, filename);

Expand Down

0 comments on commit 839837b

Please sign in to comment.