threads / patch / 18

patchgit: remove redundant getenv() in init-db

Subject: [PATCH 1/1] git: remove redundant getenv() in init-db

## tl;dr

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

replies: 0people: 1as markdown or json

tony.luck@intel.com· Apr 14, 2005, 18:30 UTC · lore
From: Tony Luck <tony.luck@intel.com>
init-db calls getenv(DB_ENVIRONMENT) twice.  Once should be enough.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 init-db.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- init-db.c +++ init-db.c 2005-04-14 11:01:52.000000000 -0700

Show changes to diff +1 −1
@@ -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