From 3442bea6fe430dd3843f0dddfe39adb40a600a18 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 31 Aug 2010 23:26:18 +0000 Subject: [PATCH] cleaner --- src/util/test_resolver_api.c | 2 +- src/util/test_strings.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index d59535f51..2c3f95367 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c @@ -254,7 +254,7 @@ run(void *cls, struct GNUNET_SCHEDULER_Handle *sched, char * const *args, * DNS rootserver to test: a.root-servers.net - 198.41.0.4 */ - char const * rootserver_name = ROOTSERVER_NAME; + const char * rootserver_name = ROOTSERVER_NAME; struct hostent *rootserver; rootserver = gethostbyname(rootserver_name); diff --git a/src/util/test_strings.c b/src/util/test_strings.c index fce40362c..abd147300 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c @@ -37,6 +37,7 @@ check () char *r; char *b; struct GNUNET_TIME_Absolute at; + const char *hdir; sprintf (buf, "4 %s", _( /* size unit */ "b")); b = GNUNET_STRINGS_byte_size_fancy (4); @@ -65,16 +66,15 @@ check () (GNUNET_TIME_UNIT_MILLISECONDS, 7 * 60 * 60 * 1000)); WANT (buf, b); - GNUNET_snprintf (buf, - sizeof (buf), - "%s%s", - getenv ( #ifndef MINGW - "HOME" + hdir = getenv ("HOME"); #else - "USERPROFILE" + hdir = getenv ("USERPROFILE"); #endif - ), + GNUNET_snprintf (buf, + sizeof (buf), + "%s%s", + hdir, DIR_SEPARATOR_STR); b = GNUNET_STRINGS_filename_expand ("~"); WANT (buf, b); -- 2.25.1