summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 66eb64c)
raw | patch | inline | side by side (parent: 66eb64c)
author | Timo Hirvonen <tihirvon@gmail.com> | |
Wed, 28 Jun 2006 09:04:39 +0000 (12:04 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 28 Jun 2006 10:24:37 +0000 (03:24 -0700) |
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-mailinfo.c | patch | blob | history | |
builtin-rev-parse.c | patch | blob | history | |
commit.c | patch | blob | history | |
connect.c | patch | blob | history | |
daemon.c | patch | blob | history | |
describe.c | patch | blob | history | |
git.c | patch | blob | history | |
http-push.c | patch | blob | history | |
imap-send.c | patch | blob | history | |
sha1_file.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 821642a7af97e7afa13a187af5ec68c8a67ae93c..3e40747cf57ed4a8f7f20d83510ae08bcfcbd33a 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
static int slurp_attr(const char *line, const char *name, char *attr)
{
- char *ends, *ap = strcasestr(line, name);
+ const char *ends, *ap = strcasestr(line, name);
size_t sz;
if (!ap) {
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index b27a6d382b7540d1d9f6fc98784646458b217af6..5f5ade45aec781df107d4a49a4a554575ac278bd 100644 (file)
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
dotdot = strstr(arg, "..");
if (dotdot) {
unsigned char end[20];
- char *next = dotdot + 2;
+ const char *next = dotdot + 2;
const char *this = arg;
*dotdot = 0;
if (!*next)
diff --git a/commit.c b/commit.c
index 946615d2ad5c364fe63b201aa9a9574737804c38..0327df12324ac77c1d5d82a22ce4b30f1b5c7a18 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -543,7 +543,7 @@ static int add_merge_info(enum cmit_fmt fmt, char *buf, const struct commit *com
const char *hex = abbrev
? find_unique_abbrev(p->object.sha1, abbrev)
: sha1_to_hex(p->object.sha1);
- char *dots = (abbrev && strlen(hex) != 40) ? "..." : "";
+ const char *dots = (abbrev && strlen(hex) != 40) ? "..." : "";
parent = parent->next;
offset += sprintf(buf + offset, " %s%s", hex, dots);
diff --git a/connect.c b/connect.c
index 66e78a29054a121c92beca3d997105f0137c170d..f9d92024a600a26f6039acf23ebfe47b0d23958c 100644 (file)
--- a/connect.c
+++ b/connect.c
{
int sockfd = -1;
char *colon, *end;
- char *port = STR(DEFAULT_GIT_PORT);
+ const char *port = STR(DEFAULT_GIT_PORT);
struct addrinfo hints, *ai0, *ai;
int gai;
static void git_proxy_connect(int fd[2],
const char *prog, char *host, char *path)
{
- char *port = STR(DEFAULT_GIT_PORT);
+ const char *port = STR(DEFAULT_GIT_PORT);
char *colon, *end;
int pipefd[2][2];
pid_t pid;
diff --git a/daemon.c b/daemon.c
index 1ba4d669da346abb5dab86ea7842a7ad4d3e1cde..e096bd7ef638273b525848fbe0018863871ea93d 100644 (file)
--- a/daemon.c
+++ b/daemon.c
* after ~user/. E.g. a request to git://host/~alice/frotz would
* go to /home/alice/pub_git/frotz with --user-path=pub_git.
*/
-static char *user_path = NULL;
+static const char *user_path = NULL;
/* Timeout, and initial timeout */
static unsigned int timeout = 0;
children_reaped = reaped + 1;
/* XXX: Custom logging, since we don't wanna getpid() */
if (verbose) {
- char *dead = "";
+ const char *dead = "";
if (!WIFEXITED(status) || WEXITSTATUS(status) > 0)
dead = " (with error)";
if (log_syslog)
diff --git a/describe.c b/describe.c
index aa3434a4cbfe62563b7621ddd7e72be3adbea1cc..8e68d5df3303ed75c2fbb9c8b3d1025785a622c7 100644 (file)
--- a/describe.c
+++ b/describe.c
return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;
}
-static void describe(char *arg, int last_one)
+static void describe(const char *arg, int last_one)
{
unsigned char sha1[20];
struct commit *cmit;
index 94505c9a902125c753c12c0ec8e6fc8268a4271c..159fec008b55932c67f2a2ce2b5c112ead959b96 100644 (file)
--- a/git.c
+++ b/git.c
static void prepend_to_path(const char *dir, int len)
{
- char *path, *old_path = getenv("PATH");
+ const char *old_path = getenv("PATH");
+ char *path;
int path_len = len;
if (!old_path)
diff --git a/http-push.c b/http-push.c
index 3c89a17496dcc72fa8773a0308281364bbf647a8..e281f70e544d1e59c47f61ce14a728ba5ef44a44 100644 (file)
--- a/http-push.c
+++ b/http-push.c
strlcpy(ctx->cdata, s, len + 1);
}
-static struct remote_lock *lock_remote(char *path, long timeout)
+static struct remote_lock *lock_remote(const char *path, long timeout)
{
struct active_request_slot *slot;
struct slot_results results;
return -1;
}
-static void fetch_symref(char *path, char **symref, unsigned char *sha1)
+static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
{
char *url;
struct buffer buffer;
diff --git a/imap-send.c b/imap-send.c
index 94e39cd94cb26b2147e214ce4032121df871834e..65c71c602db022f65660b1c29f54ddd59a3b0363 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
}
static int
-socket_write( Socket_t *sock, char *buf, int len )
+socket_write( Socket_t *sock, const char *buf, int len )
{
int n = write( sock->fd, buf, len );
if (n != len) {
diff --git a/sha1_file.c b/sha1_file.c
index c80528b506e98c1e1dae463fa08159677a2a9473..817963045b81cef36bf3a9c76b7399a70226a181 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
void prepare_alt_odb(void)
{
- char *alt;
+ const char *alt;
alt = getenv(ALTERNATE_DB_ENVIRONMENT);
if (!alt) alt = "";
diff --git a/upload-pack.c b/upload-pack.c
index 7b86f6965b5306f2162a9076f6ab3bbc1cc32a4b..2b70c3dcb4e3b1e73d7d5a088ae73de17540b6b7 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
int i;
int args;
const char **argv;
+ const char **p;
char *buf;
- char **p;
if (create_full_pack) {
args = 10;
static int send_ref(const char *refname, const unsigned char *sha1)
{
- static char *capabilities = "multi_ack thin-pack side-band";
+ static const char *capabilities = "multi_ack thin-pack side-band";
struct object *o = parse_object(sha1);
if (!o)