]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Constness tightening for move/link_temp_to_file()
authorJunio C Hamano <junkio@cox.net>
Fri, 1 Sep 2006 07:17:47 +0000 (00:17 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 1 Sep 2006 07:24:06 +0000 (00:24 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h
sha1_file.c

diff --git a/cache.h b/cache.h
index 03d9dd04883f0d1d5c79436d598d667fe680c693..7257c4c53d83defc215eb096eedd1666f809e7cb 100644 (file)
--- 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);
index af2bf72babcec71ff1a012c2baeedc089743ad4b..ce90e200cbfdf265b91a9434f911ee06bd2c263a 100644 (file)
@@ -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);