{"thread":{"id":"7836","subject":"[PATCH 2/5] entry.c: Use const qualifier for 'struct checkout' parameters","startedAt":"2007-04-25T14:18:08Z","lastAt":"2007-04-25T14:18:08Z","messageCount":1,"participants":["Luiz Fernando N. Capitulino"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"40405","messageId":"20070425111808.36ebef4d@localhost","threadId":"7836","inReplyTo":null,"subject":"[PATCH 2/5] entry.c: Use const qualifier for 'struct checkout' parameters","fromName":"Luiz Fernando N. Capitulino","fromEmail":"lcapitulino@mandriva.com.br","sentAt":"2007-04-25T14:18:08Z","receivedAt":"2007-04-25T14:18:08Z","isPatch":true,"sender":{"key":"lcapitulino@mandriva.com.br","avatar":null},"body":"Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>\n---\n cache.h |    2 +-\n entry.c |    6 +++---\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 89aaf00..fe1e2e8 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -377,7 +377,7 @@ struct checkout {\n \t\t refresh_cache:1;\n };\n \n-extern int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath);\n+extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath);\n \n extern struct alternate_object_database {\n \tstruct alternate_object_database *next;\ndiff --git a/entry.c b/entry.c\nindex b51addb..82bf725 100644\n--- a/entry.c\n+++ b/entry.c\n@@ -1,7 +1,7 @@\n #include \"cache.h\"\n #include \"blob.h\"\n \n-static void create_directories(const char *path, struct checkout *state)\n+static void create_directories(const char *path, const struct checkout *state)\n {\n \tint len = strlen(path);\n \tchar *buf = xmalloc(len + 1);\n@@ -75,7 +75,7 @@ static void *read_blob_entry(struct cache_entry *ce, const char *path, unsigned\n \treturn NULL;\n }\n \n-static int write_entry(struct cache_entry *ce, char *path, struct checkout *state, int to_tempfile)\n+static int write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile)\n {\n \tint fd;\n \tlong wrote;\n@@ -163,7 +163,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat\n \treturn 0;\n }\n \n-int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath)\n+int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath)\n {\n \tstatic char path[PATH_MAX + 1];\n \tstruct stat st;\n-- \n1.5.1.1.320.g1cf2\n"}]}