summaryrefslogtreecommitdiffstats
path: root/plugin/eurephia-auth.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-10-05 00:01:18 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-10-05 00:01:18 +0200
commit164032f3fcf86d4f08244764aab1b68a0fb6c71e (patch)
tree1541aa0612f9acc782d25d2170f2bdcd6ac2bdff /plugin/eurephia-auth.c
parent8f8632ef5f8e63cc9495550c09605d4cc9c58de8 (diff)
downloadeurephia-164032f3fcf86d4f08244764aab1b68a0fb6c71e.tar.gz
eurephia-164032f3fcf86d4f08244764aab1b68a0fb6c71e.tar.xz
eurephia-164032f3fcf86d4f08244764aab1b68a0fb6c71e.zip
Use macros to extract values via get_env()
This has two purposes. To make the code more readable and to use the same maximum length of the data being retrieved from the environment table.
Diffstat (limited to 'plugin/eurephia-auth.c')
-rw-r--r--plugin/eurephia-auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/eurephia-auth.c b/plugin/eurephia-auth.c
index 14ef79b..81a9d10 100644
--- a/plugin/eurephia-auth.c
+++ b/plugin/eurephia-auth.c
@@ -40,6 +40,7 @@
#include <eurephiadb.h>
#include <eurephia.h>
#include <eurephia_nullsafe.h>
+#include <environment.h>
#ifdef ENABLE_DEBUG /* To avoid compiler warnings when ENABLE_DEBUG is not defined */
@@ -110,9 +111,9 @@ static void dump_env(FILE *f, const char *prefix, const char *envp[]) {
*/
static void daemonize(const char *envp[])
{
- char *daemon_string = get_env(NULL, 0, 32, envp, "daemon");
+ char *daemon_string = GETENV_DAEMON(envp);
if( daemon_string && daemon_string[0] == '1' ) {
- char *log_redirect = get_env(NULL, 0, 32, envp, "daemon_log_redirect");
+ char *log_redirect = GETENV_DAEMONLOGREDIR(envp);
int fd = -1;
if( log_redirect && log_redirect[0] == '1' ) {
fd = dup (2);