@matheusbsbs / matheus-bagliano / commits / efbc583126
Fork 0

entry.c: Use const qualifier for 'struct checkout' parameters

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <junkio@cox.net>

Luiz Fernando N. Capitulino committed Apr 25, 2007 at 11:18 UTC efbc5831264fbe3696e6fc264bba9319265d7344
2 files changed +4 -4
cache.h
+1 -1
@@ -409,7 +409,7 @@ struct checkout {
409 refresh_cache:1;
410 };
411
412 -extern int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath);
412 +extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath);
413
414 extern struct alternate_object_database {
415 struct alternate_object_database *next;
entry.c
+3 -3
@@ -1,7 +1,7 @@
1 #include "cache.h"
2 #include "blob.h"
3
4 -static void create_directories(const char *path, struct checkout *state)
4 +static void create_directories(const char *path, const struct checkout *state)
5 {
6 int len = strlen(path);
7 char *buf = xmalloc(len + 1);
@@ -75,7 +75,7 @@ static void *read_blob_entry(struct cache_entry *ce, const char *path, unsigned
75 return NULL;
76 }
77
78 -static int write_entry(struct cache_entry *ce, char *path, struct checkout *state, int to_tempfile)
78 +static int write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile)
79 {
80 int fd;
81 long wrote;
@@ -163,7 +163,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
163 return 0;
164 }
165
166 -int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath)
166 +int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath)
167 {
168 static char path[PATH_MAX + 1];
169 struct stat st;