Commit 5dc25cf8244ec93067cbb36c19d73e8ef90f169b

Thomas de Grivel 2012-11-17T03:44:20

open log after checking args

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/git-auth.c b/git-auth.c
index f05d2e5..8cbac96 100644
--- a/git-auth.c
+++ b/git-auth.c
@@ -212,14 +212,14 @@ void exec_cmd (const s_symtable *cmd)
 int main (int argc, char **argv)
 {
   s_rules rr;
-  openlog(argv[0], LOG_PID, LOG_AUTH);
-  log_args("NEW", argc, (const char **)argv);
   if (argv[argc])
     err(1, "bad argument list");
   if (argc != 3)
     usage(argv[0]);
   if (strcmp(argv[1], "-c"))
     usage(argv[0]);
+  openlog(argv[0], LOG_PID, LOG_AUTH);
+  log_args("NEW", argc, (const char **)argv);
   init_package();
   const char *env_auth_id = getenv(ENV_AUTH_ID);
   t_sym id = sympackage_intern(&g_sympkg, env_auth_id ? env_auth_id : "");