From 6c5f9baa3bc0d63e141e0afc23110205379905a4 Mon Sep 17 00:00:00 2001 From: Jason Riedy Date: Tue, 23 Aug 2005 13:31:09 -0700 Subject: Replace zero-length array decls with []. C99 denotes variable-sized members with [], not [0]. Signed-off-by: Jason Riedy --- receive-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'receive-pack.c') diff --git a/receive-pack.c b/receive-pack.c index 9026f1bf82..3a1b2ab694 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -24,7 +24,7 @@ struct command { unsigned char updated; unsigned char old_sha1[20]; unsigned char new_sha1[20]; - char ref_name[0]; + char ref_name[]; }; static struct command *commands = NULL; -- cgit v1.2.3 From e72a7d45dc67afa1328750d401ddd4dbeb2131d9 Mon Sep 17 00:00:00 2001 From: Jason Riedy Date: Tue, 23 Aug 2005 13:52:01 -0700 Subject: Replace unsetenv() and setenv() with older putenv(). Solaris 8 doesn't have the newer unsetenv() and setenv() functions, so replace them with putenv(). The one use of unsetenv() in fsck-cache.c now sets GIT_ALTERNATE_OBJECT_ DIRECTORIES to the empty string. Every place that var is used, NULLs are also replaced with empty strings, so it's ok. Signed-off-by: Jason Riedy --- receive-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'receive-pack.c') diff --git a/receive-pack.c b/receive-pack.c index 3a1b2ab694..1ef0c13935 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -269,7 +269,7 @@ int main(int argc, char **argv) /* If we have a ".git" directory, chdir to it */ chdir(".git"); - setenv("GIT_DIR", ".", 1); + putenv("GIT_DIR=."); if (access("objects", X_OK) < 0 || access("refs/heads", X_OK) < 0) die("%s doesn't appear to be a git directory", dir); -- cgit v1.2.3