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>
This commit is contained in:
parent
cc2903fc70
commit
efbc583126
2
cache.h
2
cache.h
@ -409,7 +409,7 @@ struct checkout {
|
|||||||
refresh_cache:1;
|
refresh_cache:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath);
|
extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath);
|
||||||
|
|
||||||
extern struct alternate_object_database {
|
extern struct alternate_object_database {
|
||||||
struct alternate_object_database *next;
|
struct alternate_object_database *next;
|
||||||
|
6
entry.c
6
entry.c
@ -1,7 +1,7 @@
|
|||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "blob.h"
|
#include "blob.h"
|
||||||
|
|
||||||
static void create_directories(const char *path, struct checkout *state)
|
static void create_directories(const char *path, const struct checkout *state)
|
||||||
{
|
{
|
||||||
int len = strlen(path);
|
int len = strlen(path);
|
||||||
char *buf = xmalloc(len + 1);
|
char *buf = xmalloc(len + 1);
|
||||||
@ -75,7 +75,7 @@ static void *read_blob_entry(struct cache_entry *ce, const char *path, unsigned
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int write_entry(struct cache_entry *ce, char *path, struct checkout *state, int to_tempfile)
|
static int write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
long wrote;
|
long wrote;
|
||||||
@ -163,7 +163,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath)
|
int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath)
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX + 1];
|
static char path[PATH_MAX + 1];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
Loading…
Reference in New Issue
Block a user