{"thread":{"id":"5286","subject":"[PATCH] remove unnecessary initializations","startedAt":"2006-08-15T17:23:48Z","lastAt":"2006-08-15T17:23:48Z","messageCount":1,"participants":["David Rientjes"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25370","messageId":"Pine.LNX.4.63.0608151023200.26891@chino.corp.google.com","threadId":"5286","inReplyTo":null,"subject":"[PATCH] remove unnecessary initializations","fromName":"David Rientjes","fromEmail":"rientjes@google.com","sentAt":"2006-08-15T17:23:48Z","receivedAt":"2006-08-15T17:23:48Z","isPatch":true,"sender":{"key":"rientjes@google.com","avatar":null},"body":"Removed unnecessary initializations.\n\n\t\tDavid\n\nSigned-off-by: David Rientjes <rientjes@google.com>\n---\n blame.c                 |    6 +++---\n builtin-apply.c         |   26 +++++++++++++-------------\n builtin-fmt-merge-msg.c |    2 +-\n builtin-help.c          |    2 +-\n builtin-ls-files.c      |   27 ++++++++++++++-------------\n builtin-ls-tree.c       |    6 +++---\n builtin-mailinfo.c      |    6 +++---\n builtin-prune.c         |    2 +-\n builtin-push.c          |    8 ++++----\n builtin-read-tree.c     |   24 ++++++++++++------------\n builtin-repo-config.c   |   16 ++++++++--------\n builtin-rev-list.c      |    6 +++---\n builtin-rev-parse.c     |   10 +++++-----\n builtin-show-branch.c   |    6 +++---\n builtin-update-index.c  |    2 +-\n commit.c                |    6 +++---\n connect.c               |    6 +++---\n daemon.c                |   20 ++++++++++----------\n describe.c              |    6 +++---\n diff.c                  |    4 ++--\n environment.c           |   10 +++++-----\n exec_cmd.c              |    2 +-\n fetch-pack.c            |    6 +++---\n fsck-objects.c          |   14 +++++++-------\n git.c                   |    2 +-\n http-fetch.c            |    8 ++++----\n http-push.c             |   16 ++++++++--------\n local-fetch.c           |    8 ++++----\n merge-base.c            |    2 +-\n merge-index.c           |    2 +-\n mktree.c                |    1 -\n name-rev.c              |    2 +-\n pack-objects.c          |   28 ++++++++++++++--------------\n pack-redundant.c        |    4 ++--\n read-cache.c            |   12 ++++++------\n receive-pack.c          |    6 +++---\n send-pack.c             |    8 ++++----\n sha1_file.c             |    2 +-\n ssh-fetch.c             |    8 ++++----\n ssh-upload.c            |    4 ++--\n upload-pack.c           |    8 ++++----\n 41 files changed, 172 insertions(+), 172 deletions(-)\n\ndiff --git a/blame.c b/blame.c\nindex 7099b53..220d733 100644\n--- a/blame.c\n+++ b/blame.c\n@@ -56,9 +56,9 @@ struct patch {\n static void get_blob(struct commit *commit);\n \n /* Only used for statistics */\n-static int num_get_patch = 0;\n-static int num_commits = 0;\n-static int patch_time = 0;\n+static int num_get_patch;\n+static int num_commits;\n+static int patch_time;\n \n struct blame_diff_state {\n \tstruct xdiff_emit_state xm;\ndiff --git a/builtin-apply.c b/builtin-apply.c\nindex 2862eb1..69dfdc2 100644\n--- a/builtin-apply.c\n+++ b/builtin-apply.c\n@@ -28,17 +28,17 @@ static int prefix_length = -1;\n static int newfd = -1;\n \n static int p_value = 1;\n-static int allow_binary_replacement = 0;\n-static int check_index = 0;\n-static int write_index = 0;\n-static int cached = 0;\n-static int diffstat = 0;\n-static int numstat = 0;\n-static int summary = 0;\n-static int check = 0;\n+static int allow_binary_replacement;\n+static int check_index;\n+static int write_index;\n+static int cached;\n+static int diffstat;\n+static int numstat;\n+static int summary;\n+static int check;\n static int apply = 1;\n-static int no_add = 0;\n-static int show_index_info = 0;\n+static int no_add;\n+static int show_index_info;\n static int line_termination = '\\n';\n static unsigned long p_context = -1;\n static const char apply_usage[] =\n@@ -50,10 +50,10 @@ static enum whitespace_eol {\n \terror_on_whitespace,\n \tstrip_whitespace,\n } new_whitespace = warn_on_whitespace;\n-static int whitespace_error = 0;\n+static int whitespace_error;\n static int squelch_whitespace_errors = 5;\n-static int applied_after_stripping = 0;\n-static const char *patch_input_file = NULL;\n+static int applied_after_stripping;\n+static const char *patch_input_file;\n \n static void parse_whitespace_option(const char *option)\n {\ndiff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c\nindex 485ede7..28b5dfd 100644\n--- a/builtin-fmt-merge-msg.c\n+++ b/builtin-fmt-merge-msg.c\n@@ -8,7 +8,7 @@ #include \"tag.h\"\n static const char *fmt_merge_msg_usage =\n \t\"git-fmt-merge-msg [--summary] [--no-summary] [--file <file>]\";\n \n-static int merge_summary = 0;\n+static int merge_summary;\n \n static int fmt_merge_msg_config(const char *key, const char *value)\n {\ndiff --git a/builtin-help.c b/builtin-help.c\nindex 6484cb9..9ecdefd 100644\n--- a/builtin-help.c\n+++ b/builtin-help.c\n@@ -14,7 +14,7 @@ #include \"common-cmds.h\"\n static int term_columns(void)\n {\n \tchar *col_string = getenv(\"COLUMNS\");\n-\tint n_cols = 0;\n+\tint n_cols;\n \n \tif (col_string && (n_cols = atoi(col_string)) > 0)\n \t\treturn n_cols;\ndiff --git a/builtin-ls-files.c b/builtin-ls-files.c\nindex 11386c4..ad8c41e 100644\n--- a/builtin-ls-files.c\n+++ b/builtin-ls-files.c\n@@ -12,21 +12,22 @@ #include \"quote.h\"\n #include \"dir.h\"\n #include \"builtin.h\"\n \n-static int abbrev = 0;\n-static int show_deleted = 0;\n-static int show_cached = 0;\n-static int show_others = 0;\n-static int show_stage = 0;\n-static int show_unmerged = 0;\n-static int show_modified = 0;\n-static int show_killed = 0;\n-static int show_valid_bit = 0;\n+static int abbrev;\n+static int show_deleted;\n+static int show_cached;\n+static int show_others;\n+static int show_stage;\n+static int show_unmerged;\n+static int show_modified;\n+static int show_killed;\n+static int show_valid_bit;\n static int line_terminator = '\\n';\n \n-static int prefix_len = 0, prefix_offset = 0;\n-static const char **pathspec = NULL;\n-static int error_unmatch = 0;\n-static char *ps_matched = NULL;\n+static int prefix_len;\n+static int prefix_offset;\n+static const char **pathspec;\n+static int error_unmatch;\n+static char *ps_matched;\n \n static const char *tag_cached = \"\";\n static const char *tag_unmerged = \"\";\ndiff --git a/builtin-ls-tree.c b/builtin-ls-tree.c\nindex 261147f..201defd 100644\n--- a/builtin-ls-tree.c\n+++ b/builtin-ls-tree.c\n@@ -14,10 +14,10 @@ #define LS_RECURSIVE 1\n #define LS_TREE_ONLY 2\n #define LS_SHOW_TREES 4\n #define LS_NAME_ONLY 8\n-static int abbrev = 0;\n-static int ls_options = 0;\n+static int abbrev;\n+static int ls_options;\n static const char **pathspec;\n-static int chomp_prefix = 0;\n+static int chomp_prefix;\n static const char *ls_tree_prefix;\n \n static const char ls_tree_usage[] =\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex 24a4fc6..0c65f93 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -16,8 +16,8 @@ #include \"builtin.h\"\n \n static FILE *cmitmsg, *patchfile, *fin, *fout;\n \n-static int keep_subject = 0;\n-static const char *metainfo_charset = NULL;\n+static int keep_subject;\n+static const char *metainfo_charset;\n static char line[1000];\n static char date[1000];\n static char name[1000];\n@@ -31,7 +31,7 @@ static char charset[256];\n \n static char multipart_boundary[1000];\n static int multipart_boundary_len;\n-static int patch_lines = 0;\n+static int patch_lines;\n \n static char *sanity_check(char *name, char *email)\n {\ndiff --git a/builtin-prune.c b/builtin-prune.c\nindex 89ec7f1..fc885ce 100644\n--- a/builtin-prune.c\n+++ b/builtin-prune.c\n@@ -11,7 +11,7 @@ #include \"builtin.h\"\n #include \"cache-tree.h\"\n \n static const char prune_usage[] = \"git-prune [-n]\";\n-static int show_only = 0;\n+static int show_only;\n static struct rev_info revs;\n \n static int prune_object(char *path, const char *filename, const unsigned char *sha1)\ndiff --git a/builtin-push.c b/builtin-push.c\nindex 53bc378..2c23cb2 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -10,14 +10,14 @@ #define MAX_URI (16)\n \n static const char push_usage[] = \"git-push [--all] [--tags] [-f | --force] <repository> [<refspec>...]\";\n \n-static int all = 0, tags = 0, force = 0, thin = 1;\n-static const char *execute = NULL;\n+static int all, tags, force, thin = 1;\n+static const char *execute;\n \n #define BUF_SIZE (2084)\n static char buffer[BUF_SIZE];\n \n-static const char **refspec = NULL;\n-static int refspec_nr = 0;\n+static const char **refspec;\n+static int refspec_nr;\n \n static void add_refspec(const char *ref)\n {\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex f902fee..02d890f 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -15,21 +15,21 @@ #include <sys/time.h>\n #include <signal.h>\n #include \"builtin.h\"\n \n-static int reset = 0;\n-static int merge = 0;\n-static int update = 0;\n-static int index_only = 0;\n-static int nontrivial_merge = 0;\n-static int trivial_merges_only = 0;\n-static int aggressive = 0;\n-static int verbose_update = 0;\n-static volatile sig_atomic_t progress_update = 0;\n-static const char *prefix = NULL;\n+static int reset;\n+static int merge;\n+static int update;\n+static int index_only;\n+static int nontrivial_merge;\n+static int trivial_merges_only;\n+static int aggressive;\n+static int verbose_update;\n+static volatile sig_atomic_t progress_update;\n+static const char *prefix;\n \n static int head_idx = -1;\n-static int merge_size = 0;\n+static int merge_size;\n \n-static struct object_list *trees = NULL;\n+static struct object_list *trees;\n \n static struct cache_entry df_conflict_entry;\n \ndiff --git a/builtin-repo-config.c b/builtin-repo-config.c\nindex c821e22..c416480 100644\n--- a/builtin-repo-config.c\n+++ b/builtin-repo-config.c\n@@ -5,14 +5,14 @@ #include <regex.h>\n static const char git_config_set_usage[] =\n \"git-repo-config [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --unset | --unset-all] name [value [value_regex]] | --list\";\n \n-static char* key = NULL;\n-static regex_t* key_regexp = NULL;\n-static regex_t* regexp = NULL;\n-static int show_keys = 0;\n-static int use_key_regexp = 0;\n-static int do_all = 0;\n-static int do_not_match = 0;\n-static int seen = 0;\n+static char *key;\n+static regex_t *key_regexp;\n+static regex_t *regexp;\n+static int show_keys;\n+static int use_key_regexp;\n+static int do_all;\n+static int do_not_match;\n+static int seen;\n static enum { T_RAW, T_INT, T_BOOL } type = T_RAW;\n \n static int show_all_config(const char *key_, const char *value_)\ndiff --git a/builtin-rev-list.c b/builtin-rev-list.c\nindex 0dee173..bc48a3e 100644\n--- a/builtin-rev-list.c\n+++ b/builtin-rev-list.c\n@@ -39,9 +39,9 @@ static const char rev_list_usage[] =\n \n static struct rev_info revs;\n \n-static int bisect_list = 0;\n-static int show_timestamp = 0;\n-static int hdr_termination = 0;\n+static int bisect_list;\n+static int show_timestamp;\n+static int hdr_termination;\n static const char *header_prefix;\n \n static void show_commit(struct commit *commit)\ndiff --git a/builtin-rev-parse.c b/builtin-rev-parse.c\nindex aca4a36..fd3ccc8 100644\n--- a/builtin-rev-parse.c\n+++ b/builtin-rev-parse.c\n@@ -15,16 +15,16 @@ #define DO_FLAGS\t4\n #define DO_NONFLAGS\t8\n static int filter = ~0;\n \n-static const char *def = NULL;\n+static const char *def;\n \n #define NORMAL 0\n #define REVERSED 1\n static int show_type = NORMAL;\n-static int symbolic = 0;\n-static int abbrev = 0;\n-static int output_sq = 0;\n+static int symbolic;\n+static int abbrev;\n+static int output_sq;\n \n-static int revs_count = 0;\n+static int revs_count;\n \n /*\n  * Some arguments are relevant \"revision\" arguments,\ndiff --git a/builtin-show-branch.c b/builtin-show-branch.c\nindex 2a1b848..95fbf77 100644\n--- a/builtin-show-branch.c\n+++ b/builtin-show-branch.c\n@@ -8,9 +8,9 @@ #include \"builtin.h\"\n static const char show_branch_usage[] =\n \"git-show-branch [--sparse] [--current] [--all] [--heads] [--tags] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [<refs>...]\";\n \n-static int default_num = 0;\n-static int default_alloc = 0;\n-static const char **default_arg = NULL;\n+static int default_num;\n+static int default_alloc;\n+static const char **default_arg;\n \n #define UNINTERESTING\t01\n \ndiff --git a/builtin-update-index.c b/builtin-update-index.c\nindex 24dca47..d380f89 100644\n--- a/builtin-update-index.c\n+++ b/builtin-update-index.c\n@@ -23,7 +23,7 @@ static int allow_replace;\n static int info_only;\n static int force_remove;\n static int verbose;\n-static int mark_valid_only = 0;\n+static int mark_valid_only;\n #define MARK_VALID 1\n #define UNMARK_VALID 2\n \ndiff --git a/commit.c b/commit.c\nindex 77f0ca1..972d1b7 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -727,10 +727,10 @@ struct commit *pop_commit(struct commit_\n \n int count_parents(struct commit * commit)\n {\n-        int count = 0;\n+        int count;\n         struct commit_list * parents = commit->parents;\n-        for (count=0;parents; parents=parents->next,count++)\n-          ;\n+        for (count = 0; parents; parents = parents->next,count++)\n+\t\t;\n         return count;\n }\n \ndiff --git a/connect.c b/connect.c\nindex a4c02d1..6a86ab7 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -10,7 +10,7 @@ #include <arpa/inet.h>\n #include <netdb.h>\n #include <signal.h>\n \n-static char *server_capabilities = NULL;\n+static char *server_capabilities;\n \n static int check_ref(const char *name, int len, unsigned int flags)\n {\n@@ -493,8 +493,8 @@ static void git_tcp_connect(int fd[2], c\n }\n \n \n-static char *git_proxy_command = NULL;\n-static const char *rhost_name = NULL;\n+static char *git_proxy_command;\n+static const char *rhost_name;\n static int rhost_len;\n \n static int git_proxy_command_options(const char *var, const char *value)\ndiff --git a/daemon.c b/daemon.c\nindex 810837f..012936f 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -22,24 +22,24 @@ static const char daemon_usage[] =\n \"           [--reuseaddr] [--detach] [--pid-file=file] [directory...]\";\n \n /* List of acceptable pathname prefixes */\n-static char **ok_paths = NULL;\n-static int strict_paths = 0;\n+static char **ok_paths;\n+static int strict_paths;\n \n /* If this is set, git-daemon-export-ok is not required */\n-static int export_all_trees = 0;\n+static int export_all_trees;\n \n /* Take all paths relative to this one if non-NULL */\n-static char *base_path = NULL;\n+static char *base_path;\n \n /* If defined, ~user notation is allowed and the string is inserted\n  * after ~user/.  E.g. a request to git://host/~alice/frotz would\n  * go to /home/alice/pub_git/frotz with --user-path=pub_git.\n  */\n-static const char *user_path = NULL;\n+static const char *user_path;\n \n /* Timeout, and initial timeout */\n-static unsigned int timeout = 0;\n-static unsigned int init_timeout = 0;\n+static unsigned int timeout;\n+static unsigned int init_timeout;\n \n static void logreport(int priority, const char *err, va_list params)\n {\n@@ -333,12 +333,12 @@ #define MAX_CHILDREN 128\n static int max_connections = 25;\n \n /* These are updated by the signal handler */\n-static volatile unsigned int children_reaped = 0;\n+static volatile unsigned int children_reaped;\n static pid_t dead_child[MAX_CHILDREN];\n \n /* These are updated by the main loop */\n-static unsigned int children_spawned = 0;\n-static unsigned int children_deleted = 0;\n+static unsigned int children_spawned;\n+static unsigned int children_deleted;\n \n static struct child {\n \tpid_t pid;\ndiff --git a/describe.c b/describe.c\nindex 324ca89..a54f4f8 100644\n--- a/describe.c\n+++ b/describe.c\n@@ -8,12 +8,12 @@ #define SEEN (1u << 0)\n static const char describe_usage[] =\n \"git-describe [--all] [--tags] [--abbrev=<n>] <committish>*\";\n \n-static int all = 0;\t/* Default to annotated tags only */\n-static int tags = 0;\t/* But allow any tags if --tags is specified */\n+static int all;\t/* Default to annotated tags only */\n+static int tags;\t/* But allow any tags if --tags is specified */\n \n static int abbrev = DEFAULT_ABBREV;\n \n-static int names = 0, allocs = 0;\n+static int names, allocs;\n static struct commit_name {\n \tconst struct commit *commit;\n \tint prio; /* annotated tag = 2, tag = 1, head = 0 */\ndiff --git a/diff.c b/diff.c\nindex b3b1781..9f3ca06 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -13,9 +13,9 @@ #include \"xdiff-interface.h\"\n \n static int use_size_cache;\n \n-static int diff_detect_rename_default = 0;\n+static int diff_detect_rename_default;\n static int diff_rename_limit_default = -1;\n-static int diff_use_color_default = 0;\n+static int diff_use_color_default;\n \n /* \"\\033[1;38;5;2xx;48;5;2xxm\\0\" is 23 bytes */\n static char diff_colors[][24] = {\ndiff --git a/environment.c b/environment.c\nindex 87162b2..e6bd003 100644\n--- a/environment.c\n+++ b/environment.c\n@@ -13,14 +13,14 @@ char git_default_email[MAX_GITNAME];\n char git_default_name[MAX_GITNAME];\n int use_legacy_headers = 1;\n int trust_executable_bit = 1;\n-int assume_unchanged = 0;\n-int prefer_symlink_refs = 0;\n-int log_all_ref_updates = 0;\n+int assume_unchanged;\n+int prefer_symlink_refs;\n+int log_all_ref_updates;\n int warn_ambiguous_refs = 1;\n-int repository_format_version = 0;\n+int repository_format_version;\n char git_commit_encoding[MAX_ENCODING_LENGTH] = \"utf-8\";\n int shared_repository = PERM_UMASK;\n-const char *apply_default_whitespace = NULL;\n+const char *apply_default_whitespace;\n int zlib_compression_level = Z_DEFAULT_COMPRESSION;\n int pager_in_use;\n int pager_use_color = 1;\ndiff --git a/exec_cmd.c b/exec_cmd.c\nindex 62f51fc..e30936d 100644\n--- a/exec_cmd.c\n+++ b/exec_cmd.c\n@@ -5,7 +5,7 @@ #define MAX_ARGS\t32\n \n extern char **environ;\n static const char *builtin_exec_path = GIT_EXEC_PATH;\n-static const char *current_exec_path = NULL;\n+static const char *current_exec_path;\n \n void git_set_exec_path(const char *exec_path)\n {\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex b7824db..e18c148 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -24,8 +24,8 @@ #define POPPED\t\t(1U << 4)\n  */\n #define MAX_IN_VAIN 256\n \n-static struct commit_list *rev_list = NULL;\n-static int non_common_revs = 0, multi_ack = 0, use_thin_pack = 0, use_sideband;\n+static struct commit_list *rev_list;\n+static int non_common_revs, multi_ack, use_thin_pack, use_sideband;\n \n static void rev_list_push(struct commit *commit, int mark)\n {\n@@ -250,7 +250,7 @@ done:\n \treturn retval;\n }\n \n-static struct commit_list *complete = NULL;\n+static struct commit_list *complete;\n \n static int mark_complete(const char *path, const unsigned char *sha1)\n {\ndiff --git a/fsck-objects.c b/fsck-objects.c\nindex e167f41..ffc0e8e 100644\n--- a/fsck-objects.c\n+++ b/fsck-objects.c\n@@ -14,12 +14,12 @@ #include \"tree-walk.h\"\n #define REACHABLE 0x0001\n #define SEEN      0x0002\n \n-static int show_root = 0;\n-static int show_tags = 0;\n-static int show_unreachable = 0;\n-static int check_full = 0;\n-static int check_strict = 0;\n-static int keep_cache_objects = 0;\n+static int show_root;\n+static int show_tags;\n+static int show_unreachable;\n+static int check_full;\n+static int check_strict;\n+static int keep_cache_objects;\n static unsigned char head_sha1[20];\n \n #ifdef NO_D_INO_IN_DIRENT\n@@ -401,7 +401,7 @@ static int fsck_dir(int i, char *path)\n \treturn 0;\n }\n \n-static int default_refs = 0;\n+static int default_refs;\n \n static int fsck_handle_ref(const char *refname, const unsigned char *sha1)\n {\ndiff --git a/git.c b/git.c\nindex 18ba14a..c56cb14 100644\n--- a/git.c\n+++ b/git.c\n@@ -92,7 +92,7 @@ static int handle_options(const char*** \n }\n \n static const char *alias_command;\n-static char *alias_string = NULL;\n+static char *alias_string;\n \n static int git_alias_config(const char *var, const char *value)\n {\ndiff --git a/http-fetch.c b/http-fetch.c\nindex de5fc44..7f07d2a 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -36,10 +36,10 @@ #endif\n #define PREV_BUF_SIZE 4096\n #define RANGE_HEADER_SIZE 30\n \n-static int commits_on_stdin = 0;\n+static int commits_on_stdin;\n \n static int got_alternates = -1;\n-static int corrupt_object_found = 0;\n+static int corrupt_object_found;\n \n static struct curl_slist *no_pragma_header;\n \n@@ -52,7 +52,7 @@ struct alt_base\n \tstruct alt_base *next;\n };\n \n-static struct alt_base *alt = NULL;\n+static struct alt_base *alt;\n \n enum object_request_state {\n \tWAITING,\n@@ -114,7 +114,7 @@ struct remote_ls_ctx\n };\n #endif\n \n-static struct object_request *object_queue_head = NULL;\n+static struct object_request *object_queue_head;\n \n static size_t fwrite_sha1_file(void *ptr, size_t eltsize, size_t nmemb,\n \t\t\t       void *data)\ndiff --git a/http-push.c b/http-push.c\nindex d45733e..72a7b93 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -70,18 +70,18 @@ #define PUSHING  (1u<<19)\n /* We allow \"recursive\" symbolic refs. Only within reason, though */\n #define MAXDEPTH 5\n \n-static int pushing = 0;\n-static int aborted = 0;\n+static int pushing;\n+static int aborted;\n static signed char remote_dir_exists[256];\n \n static struct curl_slist *no_pragma_header;\n static struct curl_slist *default_headers;\n \n-static int push_verbosely = 0;\n-static int push_all = 0;\n-static int force_all = 0;\n+static int push_verbosely;\n+static int push_all;\n+static int force_all;\n \n-static struct object_list *objects = NULL;\n+static struct object_list *objects;\n \n struct repo\n {\n@@ -94,7 +94,7 @@ struct repo\n \tstruct remote_lock *locks;\n };\n \n-static struct repo *remote = NULL;\n+static struct repo *remote;\n \n enum transfer_state {\n \tNEED_FETCH,\n@@ -134,7 +134,7 @@ struct transfer_request\n \tstruct transfer_request *next;\n };\n \n-static struct transfer_request *request_queue_head = NULL;\n+static struct transfer_request *request_queue_head;\n \n struct xml_ctx\n {\ndiff --git a/local-fetch.c b/local-fetch.c\nindex 7d01845..7b6875c 100644\n--- a/local-fetch.c\n+++ b/local-fetch.c\n@@ -5,10 +5,10 @@ #include \"cache.h\"\n #include \"commit.h\"\n #include \"fetch.h\"\n \n-static int use_link = 0;\n-static int use_symlink = 0;\n+static int use_link;\n+static int use_symlink;\n static int use_filecopy = 1;\n-static int commits_on_stdin = 0;\n+static int commits_on_stdin;\n \n static const char *path; /* \"Remote\" git repository */\n \n@@ -16,7 +16,7 @@ void prefetch(unsigned char *sha1)\n {\n }\n \n-static struct packed_git *packs = NULL;\n+static struct packed_git *packs;\n \n static void setup_index(unsigned char *sha1)\n {\ndiff --git a/merge-base.c b/merge-base.c\nindex 59f723f..009caf8 100644\n--- a/merge-base.c\n+++ b/merge-base.c\n@@ -2,7 +2,7 @@ #include <stdlib.h>\n #include \"cache.h\"\n #include \"commit.h\"\n \n-static int show_all = 0;\n+static int show_all;\n \n static int merge_base(struct commit *rev1, struct commit *rev2)\n {\ndiff --git a/merge-index.c b/merge-index.c\nindex a9c8cc1..646d090 100644\n--- a/merge-index.c\n+++ b/merge-index.c\n@@ -4,7 +4,7 @@ #include <signal.h>\n \n #include \"cache.h\"\n \n-static const char *pgm = NULL;\n+static const char *pgm;\n static const char *arguments[8];\n static int one_shot, quiet;\n static int err;\ndiff --git a/mktree.c b/mktree.c\nindex 9a6f0d2..9324138 100644\n--- a/mktree.c\n+++ b/mktree.c\n@@ -49,7 +49,6 @@ static void write_tree(unsigned char *sh\n \tint i;\n \n \tqsort(entries, used, sizeof(*entries), ent_compare);\n-\tsize = 100;\n \tfor (size = i = 0; i < used; i++)\n \t\tsize += 32 + entries[i]->len;\n \tbuffer = xmalloc(size);\ndiff --git a/name-rev.c b/name-rev.c\nindex f92f14e..40c3ea5 100644\n--- a/name-rev.c\n+++ b/name-rev.c\n@@ -74,7 +74,7 @@ copy_data:\n \t}\n }\n \n-static int tags_only = 0;\n+static int tags_only;\n \n static int name_ref(const char *path, const unsigned char *sha1)\n {\ndiff --git a/pack-objects.c b/pack-objects.c\nindex 861c7f0..48dee11 100644\n--- a/pack-objects.c\n+++ b/pack-objects.c\n@@ -52,17 +52,17 @@ struct object_entry {\n  */\n \n static unsigned char object_list_sha1[20];\n-static int non_empty = 0;\n-static int no_reuse_delta = 0;\n-static int local = 0;\n-static int incremental = 0;\n+static int non_empty;\n+static int no_reuse_delta;\n+static int local;\n+static int incremental;\n static struct object_entry **sorted_by_sha, **sorted_by_type;\n-static struct object_entry *objects = NULL;\n-static int nr_objects = 0, nr_alloc = 0, nr_result = 0;\n+static struct object_entry *objects;\n+static int nr_objects, nr_alloc, nr_result;\n static const char *base_name;\n static unsigned char pack_file_sha1[20];\n static int progress = 1;\n-static volatile sig_atomic_t progress_update = 0;\n+static volatile sig_atomic_t progress_update;\n static int window = 10;\n \n /*\n@@ -71,8 +71,8 @@ static int window = 10;\n  * sorted_by_sha is also possible but this was easier to code and faster.\n  * This hashtable is built after all the objects are seen.\n  */\n-static int *object_ix = NULL;\n-static int object_ix_hashsz = 0;\n+static int *object_ix;\n+static int object_ix_hashsz;\n \n /*\n  * Pack index for existing packs give us easy access to the offsets into\n@@ -89,15 +89,15 @@ struct pack_revindex {\n \tstruct packed_git *p;\n \tunsigned long *revindex;\n } *pack_revindex = NULL;\n-static int pack_revindex_hashsz = 0;\n+static int pack_revindex_hashsz;\n \n /*\n  * stats\n  */\n-static int written = 0;\n-static int written_delta = 0;\n-static int reused = 0;\n-static int reused_delta = 0;\n+static int written;\n+static int written_delta;\n+static int reused;\n+static int reused_delta;\n \n static int pack_revindex_ix(struct packed_git *p)\n {\ndiff --git a/pack-redundant.c b/pack-redundant.c\nindex 41fb960..92a09ed 100644\n--- a/pack-redundant.c\n+++ b/pack-redundant.c\n@@ -13,7 +13,7 @@ #define BLKSIZE 512\n static const char pack_redundant_usage[] =\n \"git-pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>\";\n \n-static int load_all_packs = 0, verbose = 0, alt_odb = 0;\n+static int load_all_packs, verbose, alt_odb;\n \n struct llist_item {\n \tstruct llist_item *next;\n@@ -37,7 +37,7 @@ struct pll {\n \tstruct pack_list *pl;\n };\n \n-static struct llist_item *free_nodes = NULL;\n+static struct llist_item *free_nodes;\n \n static inline void llist_item_put(struct llist_item *item)\n {\ndiff --git a/read-cache.c b/read-cache.c\nindex f92cdaa..a120373 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -18,16 +18,16 @@ #include \"cache-tree.h\"\n #define CACHE_EXT(s) ( (s[0]<<24)|(s[1]<<16)|(s[2]<<8)|(s[3]) )\n #define CACHE_EXT_TREE 0x54524545\t/* \"TREE\" */\n \n-struct cache_entry **active_cache = NULL;\n+struct cache_entry **active_cache;\n static time_t index_file_timestamp;\n-unsigned int active_nr = 0, active_alloc = 0, active_cache_changed = 0;\n+unsigned int active_nr, active_alloc, active_cache_changed;\n \n-struct cache_tree *active_cache_tree = NULL;\n+struct cache_tree *active_cache_tree;\n \n-int cache_errno = 0;\n+int cache_errno;\n \n-static void *cache_mmap = NULL;\n-static size_t cache_mmap_size = 0;\n+static void *cache_mmap;\n+static size_t cache_mmap_size;\n \n /*\n  * This only updates the \"non-critical\" parts of the directory\ndiff --git a/receive-pack.c b/receive-pack.c\nindex 93929b5..81e9190 100644\n--- a/receive-pack.c\n+++ b/receive-pack.c\n@@ -8,10 +8,10 @@ static const char receive_pack_usage[] =\n \n static const char *unpacker[] = { \"unpack-objects\", NULL };\n \n-static int report_status = 0;\n+static int report_status;\n \n static char capabilities[] = \"report-status\";\n-static int capabilities_sent = 0;\n+static int capabilities_sent;\n \n static int show_ref(const char *path, const unsigned char *sha1)\n {\n@@ -40,7 +40,7 @@ struct command {\n \tchar ref_name[FLEX_ARRAY]; /* more */\n };\n \n-static struct command *commands = NULL;\n+static struct command *commands;\n \n static int is_all_zeroes(const char *hex)\n {\ndiff --git a/send-pack.c b/send-pack.c\nindex 10bc8bc..675819a 100644\n--- a/send-pack.c\n+++ b/send-pack.c\n@@ -9,10 +9,10 @@ static const char send_pack_usage[] =\n \"git-send-pack [--all] [--exec=git-receive-pack] <remote> [<head>...]\\n\"\n \"  --all and explicit <head> specification are mutually exclusive.\";\n static const char *exec = \"git-receive-pack\";\n-static int verbose = 0;\n-static int send_all = 0;\n-static int force_update = 0;\n-static int use_thin_pack = 0;\n+static int verbose;\n+static int send_all;\n+static int force_update;\n+static int use_thin_pack;\n \n static int is_zero_sha1(const unsigned char *sha1)\n {\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 3db956d..eb88547 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -22,7 +22,7 @@ #define O_NOATIME 0\n #endif\n #endif\n \n-const unsigned char null_sha1[20] = { 0, };\n+const unsigned char null_sha1[20];\n \n static unsigned int sha1_file_open_flag = O_NOATIME;\n \ndiff --git a/ssh-fetch.c b/ssh-fetch.c\nindex c7d8fa8..0b89df6 100644\n--- a/ssh-fetch.c\n+++ b/ssh-fetch.c\n@@ -17,7 +17,7 @@ #include \"refs.h\"\n static int fd_in;\n static int fd_out;\n \n-static unsigned char remote_version = 0;\n+static unsigned char remote_version;\n static unsigned char local_version = 1;\n \n static ssize_t force_write(int fd, void *buffer, size_t length)\n@@ -36,9 +36,9 @@ static ssize_t force_write(int fd, void \n \treturn ret;\n }\n \n-static int prefetches = 0;\n+static int prefetches;\n \n-static struct object_list *in_transit = NULL;\n+static struct object_list *in_transit;\n static struct object_list **end_of_transit = &in_transit;\n \n void prefetch(unsigned char *sha1)\n@@ -59,7 +59,7 @@ void prefetch(unsigned char *sha1)\n }\n \n static char conn_buf[4096];\n-static size_t conn_buf_posn = 0;\n+static size_t conn_buf_posn;\n \n int fetch(unsigned char *sha1)\n {\ndiff --git a/ssh-upload.c b/ssh-upload.c\nindex 2da6661..20b15ea 100644\n--- a/ssh-upload.c\n+++ b/ssh-upload.c\n@@ -15,9 +15,9 @@ #include \"refs.h\"\n #include <string.h>\n \n static unsigned char local_version = 1;\n-static unsigned char remote_version = 0;\n+static unsigned char remote_version;\n \n-static int verbose = 0;\n+static int verbose;\n \n static int serve_object(int fd_in, int fd_out) {\n \tssize_t size;\ndiff --git a/upload-pack.c b/upload-pack.c\nindex 07ecdb4..70c1816 100644\n--- a/upload-pack.c\n+++ b/upload-pack.c\n@@ -16,12 +16,12 @@ #define OUR_REF (1U << 1)\n #define WANTED (1U << 2)\n #define MAX_HAS 256\n #define MAX_NEEDS 256\n-static int nr_has = 0, nr_needs = 0, multi_ack = 0, nr_our_refs = 0;\n-static int use_thin_pack = 0;\n+static int nr_has, nr_needs, multi_ack, nr_our_refs;\n+static int use_thin_pack;\n static unsigned char has_sha1[MAX_HAS][20];\n static unsigned char needs_sha1[MAX_NEEDS][20];\n-static unsigned int timeout = 0;\n-static int use_sideband = 0;\n+static unsigned int timeout;\n+static int use_sideband;\n \n static void reset_timeout(void)\n {\n-- \n1.4.2.rc4.g80f85-dirty\n"}]}