Constness tightening for move/link_temp_to_file()
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Sep 1, 2006 at 00:17 UTC
839837b953c613c1649b9e36ec2f01da759d87e3
2 files changed
+3
-3
cache.h
+1
-1
@@ -257,7 +257,7 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l
257
extern int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
258
size_t bufsize, size_t *bufposn);
259
extern int write_sha1_to_fd(int fd, const unsigned char *sha1);
260
-extern int move_temp_to_file(const char *tmpfile, char *filename);
260
+extern int move_temp_to_file(const char *tmpfile, const char *filename);
261
262
extern int has_sha1_pack(const unsigned char *sha1);
263
extern int has_sha1_file(const unsigned char *sha1);
sha1_file.c
+2
-2
@@ -1348,7 +1348,7 @@ char *write_sha1_file_prepare(void *buf,
1348
*
1349
* Returns the errno on failure, 0 on success.
1350
*/
1351
-static int link_temp_to_file(const char *tmpfile, char *filename)
1351
+static int link_temp_to_file(const char *tmpfile, const char *filename)
1352
{
1353
int ret;
1354
char *dir;
@@ -1381,7 +1381,7 @@ static int link_temp_to_file(const char *tmpfile, char *filename)
1381
/*
1382
* Move the just written object into its final resting place
1383
*/
1384
-int move_temp_to_file(const char *tmpfile, char *filename)
1384
+int move_temp_to_file(const char *tmpfile, const char *filename)
1385
{
1386
int ret = link_temp_to_file(tmpfile, filename);
1387