diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-10-05 00:01:18 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-10-05 00:01:18 +0200 |
commit | 164032f3fcf86d4f08244764aab1b68a0fb6c71e (patch) | |
tree | 1541aa0612f9acc782d25d2170f2bdcd6ac2bdff /plugin/eurephia-auth.c | |
parent | 8f8632ef5f8e63cc9495550c09605d4cc9c58de8 (diff) | |
download | eurephia-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.c | 5 |
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); |