summaryrefslogtreecommitdiff
path: root/credential-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'credential-cache.c')
-rw-r--r--credential-cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/credential-cache.c b/credential-cache.c
index 9a03792..86e21de 100644
--- a/credential-cache.c
+++ b/credential-cache.c
@@ -32,17 +32,17 @@ static int send_request(const char *socket, const struct strbuf *out)
write_or_die(1, in, r);
got_data = 1;
}
+ close(fd);
return got_data;
}
static void spawn_daemon(const char *socket)
{
- struct child_process daemon;
+ struct child_process daemon = CHILD_PROCESS_INIT;
const char *argv[] = { NULL, NULL, NULL };
char buf[128];
int r;
- memset(&daemon, 0, sizeof(daemon));
argv[0] = "git-credential-cache--daemon";
argv[1] = socket;
daemon.argv = argv;
@@ -89,7 +89,7 @@ int main(int argc, const char **argv)
int timeout = 900;
const char *op;
const char * const usage[] = {
- "git credential-cache [options] <action>",
+ "git credential-cache [<options>] <action>",
NULL
};
struct option options[] = {