use putenv instead of setenv for portability
[oweals/gnunet.git] / src / util / getopt_helpers.c
index d050ec99c18667032aa4b37646cfe56b4cc461e8..8b49c5907ab70bbbbf0f1ed6eb1e47b1084afe35 100644 (file)
@@ -28,6 +28,8 @@
 #include "gnunet_common.h"
 #include "gnunet_getopt_lib.h"
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
 
 /**
  * Print out program version (implements --version).
@@ -223,8 +225,7 @@ GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   char **val = scls;
 
   GNUNET_assert (value != NULL);
-  if (NULL != *val)
-    GNUNET_free (*val);
+  GNUNET_free_non_null (*val);
   *val = GNUNET_strdup (value);
   return GNUNET_OK;
 }