cleaner
authorChristian Grothoff <christian@grothoff.org>
Tue, 31 Aug 2010 23:26:18 +0000 (23:26 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 31 Aug 2010 23:26:18 +0000 (23:26 +0000)
src/util/test_resolver_api.c
src/util/test_strings.c

index d59535f515f9910e68b430c35ad2d32b82ca8a9f..2c3f953676ad823fa431828d2baec3c0f9485d72 100644 (file)
@@ -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);
index fce40362c3c3bd08905d4526703e7e0b24c2d2d8..abd147300eaf05cd3861baec04ff30fd6c458e85 100644 (file)
@@ -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);