From: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
To: junkio@cox.net
Cc: Git List <git@vger.kernel.org>
Subject: [PATCH 2/5] entry.c: Use const qualifier for 'struct checkout' parameters
Date: Wed, 25 Apr 2007 11:18:08 -0300 [thread overview]
Message-ID: <20070425111808.36ebef4d@localhost> (raw)
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
---
cache.h | 2 +-
entry.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cache.h b/cache.h
index 89aaf00..fe1e2e8 100644
--- a/cache.h
+++ b/cache.h
@@ -377,7 +377,7 @@ struct checkout {
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 {
struct alternate_object_database *next;
diff --git a/entry.c b/entry.c
index b51addb..82bf725 100644
--- a/entry.c
+++ b/entry.c
@@ -1,7 +1,7 @@
#include "cache.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);
char *buf = xmalloc(len + 1);
@@ -75,7 +75,7 @@ static void *read_blob_entry(struct cache_entry *ce, const char *path, unsigned
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;
long wrote;
@@ -163,7 +163,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
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];
struct stat st;
--
1.5.1.1.320.g1cf2
reply other threads:[~2007-04-25 14:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070425111808.36ebef4d@localhost \
--to=lcapitulino@mandriva.com.br \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).