commit ba81aa76b94c72b1ca6dff4386b81232df8f7d6e
parent e376b25a120ac2bc988674df1e21f954760a32e2
Author: Érico Nogueira <erico.erc@gmail.com>
Date: Sun, 3 Oct 2021 05:39:16 -0300
define SOCKPATH in one place.
Diffstat:
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/common.h b/common.h
@@ -12,3 +12,7 @@
#if SALT_LEN == 0 || SALT_LEN > SIZE_MAX - 4
#error Invalid salt size
#endif
+
+#ifndef SOCKPATH
+#define SOCKPATH "/tmp/npm-agent"
+#endif
diff --git a/npm-agent.c b/npm-agent.c
@@ -24,10 +24,6 @@
#include "common.h"
-#ifndef SOCKPATH
-#define SOCKPATH "/tmp/npm-agent"
-#endif
-
#ifndef TIMEOUT
#define TIMEOUT 10000
#endif
diff --git a/npmc.c b/npmc.c
@@ -11,10 +11,6 @@
#include "common.h"
-#ifndef SOCKPATH
-#define SOCKPATH "/tmp/npm-agent"
-#endif
-
char answer[PASSWORD_MAX_LEN + 1];
int answerlen = 0;