aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Riedy <ejr@cs.berkeley.edu>2005-08-23 13:31:09 -0700
committerJason Riedy <ejr@cs.berkeley.edu>2005-08-23 20:41:11 -0700
commit6c5f9baa3bc0d63e141e0afc23110205379905a4 (patch)
tree3fd2a88512168179a81756768f444ecf3ccd23d6
parent2a29da7c6d6103c4719c71f6cce88e853260912c (diff)
downloadgit-6c5f9baa3bc0d63e141e0afc23110205379905a4.tar.gz
git-6c5f9baa3bc0d63e141e0afc23110205379905a4.tar.xz
Replace zero-length array decls with [].
C99 denotes variable-sized members with [], not [0]. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
-rw-r--r--cache.h8
-rw-r--r--commit.c2
-rw-r--r--ls-files.c2
-rw-r--r--receive-pack.c2
-rw-r--r--server-info.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/cache.h b/cache.h
index ba5c4ab7e..e7f5a2e16 100644
--- a/cache.h
+++ b/cache.h
@@ -100,7 +100,7 @@ struct cache_entry {
unsigned int ce_size;
unsigned char sha1[20];
unsigned short ce_flags;
- char name[0];
+ char name[];
};
#define CE_NAMEMASK (0x0fff)
@@ -283,7 +283,7 @@ extern int checkout_entry(struct cache_entry *ce, struct checkout *state);
extern struct alternate_object_database {
struct alternate_object_database *next;
char *name;
- char base[0]; /* more */
+ char base[]; /* more */
} *alt_odb_list;
extern void prepare_alt_odb(void);
@@ -296,7 +296,7 @@ extern struct packed_git {
unsigned int pack_last_used;
unsigned int pack_use_cnt;
unsigned char sha1[20];
- char pack_name[0]; /* something like ".git/objects/pack/xxxxx.pack" */
+ char pack_name[]; /* something like ".git/objects/pack/xxxxx.pack" */
} *packed_git;
struct pack_entry {
@@ -310,7 +310,7 @@ struct ref {
unsigned char old_sha1[20];
unsigned char new_sha1[20];
struct ref *peer_ref; /* when renaming */
- char name[0];
+ char name[];
};
extern int git_connect(int fd[2], char *url, const char *prog);
diff --git a/commit.c b/commit.c
index e51eda152..56192587a 100644
--- a/commit.c
+++ b/commit.c
@@ -102,7 +102,7 @@ static unsigned long parse_commit_date(const char *buf)
static struct commit_graft {
unsigned char sha1[20];
int nr_parent;
- unsigned char parent[0][20]; /* more */
+ unsigned char parent[][20]; /* more */
} **commit_graft;
static int commit_graft_alloc, commit_graft_nr;
diff --git a/ls-files.c b/ls-files.c
index 2c7aada88..56f3919e0 100644
--- a/ls-files.c
+++ b/ls-files.c
@@ -205,7 +205,7 @@ static int excluded(const char *pathname)
struct nond_on_fs {
int len;
- char name[0];
+ char name[];
};
static struct nond_on_fs **dir;
diff --git a/receive-pack.c b/receive-pack.c
index 9026f1bf8..3a1b2ab69 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;
diff --git a/server-info.c b/server-info.c
index 2b3aecab4..cb58eb607 100644
--- a/server-info.c
+++ b/server-info.c
@@ -70,7 +70,7 @@ static struct pack_info {
int nr_alloc;
int nr_heads;
unsigned char (*head)[20];
- char dep[0]; /* more */
+ char dep[]; /* more */
} **info;
static int num_pack;
static const char *objdir;