Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Constness tightening for move/link_temp_to_file()
author
Junio C Hamano
<junkio@cox.net>
Fri, 1 Sep 2006 07:17:47 +0000
(
00:17
-0700)
committer
Junio 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
patch
|
blob
|
history
sha1_file.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1d3fc68
)
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 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, c
onst c
har *filename);
extern int has_sha1_pack(const unsigned char *sha1);
extern int has_sha1_file(const unsigned char *sha1);
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 af2bf72babcec71ff1a012c2baeedc089743ad4b..ce90e200cbfdf265b91a9434f911ee06bd2c263a 100644
(file)
--- 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.
*/
*
* 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, c
onst c
har *filename)
{
int ret;
char *dir;
{
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
*/
/*
* 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, c
onst c
har *filename)
{
int ret = link_temp_to_file(tmpfile, filename);
{
int ret = link_temp_to_file(tmpfile, filename);