From: Junio C Hamano Date: Fri, 1 Sep 2006 07:17:47 +0000 (-0700) Subject: Constness tightening for move/link_temp_to_file() X-Git-Tag: v1.4.3-rc1~135^2~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=839837b953c613c1649b9e36ec2f01da759d87e3;p=git.git Constness tightening for move/link_temp_to_file() Signed-off-by: Junio C Hamano --- diff --git a/cache.h b/cache.h index 03d9dd048..7257c4c53 100644 --- a/cache.h +++ b/cache.h @@ -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); diff --git a/sha1_file.c b/sha1_file.c index af2bf72ba..ce90e200c 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -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; @@ -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);