threads / patch / 132

patch, 8 partsinit-db.c: [RESEND] remove redundant getenv call

Subject: [PATCH 1/8] init-db.c: [RESEND] remove redundant getenv call

## tl;dr

One message between Apr 19, 2005 and Apr 19, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Zach Welch· Apr 19, 2005, 09:09 UTC · lore
init-db calls getenv(DB_ENVIRONMENT) twice.  Once should be enough.
This patch applies on top of:
        [PATCH 0/8] init-db.c cleanup, add INDEX_FILE_DIRECTORY support
 init-db.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)
Signed-Off-By: Zach Welch <zw@superlucidity.net>
Signed-Off-By: Tony Luck <tony.luck@intel.com>
Show changes to init-db.c +1 −2
--- a/init-db.c	2005-04-14 11:01:52.000000000 -0700
+++ b/init-db.c	2005-04-14 11:01:52.000000000 -0700
@@ -7,7 +7,7 @@
 
 int main(int argc, char **argv)
 {
-	char *sha1_dir = getenv(DB_ENVIRONMENT), *path;
+	char *sha1_dir, *path;
 	int len, i;
 
 	if (mkdir(".git", 0755) < 0) {
-

← back to recent threads