aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-14 07:23:11 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-14 07:23:11 +0000
commita0b178aa52170a1f8f6582f8541f4c91be943154 (patch)
tree5e0c7f6adc8ddeb084a2ccfe93fa5ef454861853 /src/util
parent662b5736c37e8cf2b3e6aa5af53cef0d03b743ab (diff)
downloadgnunet-a0b178aa52170a1f8f6582f8541f4c91be943154.tar.gz
gnunet-a0b178aa52170a1f8f6582f8541f4c91be943154.zip
LRN: Use GNUNET_strdup() instead of strdup()
Diffstat (limited to 'src/util')
-rw-r--r--src/util/common_logging.c10
-rw-r--r--src/util/os_installation.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 503fb671d..1d3843cfd 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -283,16 +283,16 @@ add_definition (char *component, char *file, char *function, int from_line,
283 struct LogDef n; 283 struct LogDef n;
284 memset (&n, 0, sizeof (n)); 284 memset (&n, 0, sizeof (n));
285 if (strlen (component) > 0 && component[0] != '*') 285 if (strlen (component) > 0 && component[0] != '*')
286 n.component = strdup (component); 286 n.component = GNUNET_strdup (component);
287 if (strlen (file) > 0 && file[0] != '*') 287 if (strlen (file) > 0 && file[0] != '*')
288 { 288 {
289 n.file = strdup (file); 289 n.file = GNUNET_strdup (file);
290 n.strlen_file = strlen (file); 290 n.strlen_file = strlen (file);
291 } 291 }
292 if ( (NULL != function) && 292 if ( (NULL != function) &&
293 (strlen (function) > 0) && 293 (strlen (function) > 0) &&
294 (function[0] != '*') ) 294 (function[0] != '*') )
295 n.function = strdup (function); 295 n.function = GNUNET_strdup (function);
296 n.from_line = from_line; 296 n.from_line = from_line;
297 n.to_line = to_line; 297 n.to_line = to_line;
298 n.level = level; 298 n.level = level;
@@ -403,7 +403,7 @@ parse_definitions (const char *constname, int force)
403 tmp = getenv (constname); 403 tmp = getenv (constname);
404 if (tmp == NULL) 404 if (tmp == NULL)
405 return 0; 405 return 0;
406 def = strdup (tmp); 406 def = GNUNET_strdup (tmp);
407 level = -1; 407 level = -1;
408 from_line = 0; 408 from_line = 0;
409 to_line = INT_MAX; 409 to_line = INT_MAX;
@@ -532,7 +532,7 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
532 GNUNET_free_non_null (component); 532 GNUNET_free_non_null (component);
533 GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); 533 GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
534 GNUNET_free_non_null (component_nopid); 534 GNUNET_free_non_null (component_nopid);
535 component_nopid = strdup (comp); 535 component_nopid = GNUNET_strdup (comp);
536 536
537 env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); 537 env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
538 if (env_logfile != NULL) 538 if (env_logfile != NULL)
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index 688cc448e..080496bbc 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -178,7 +178,7 @@ get_path_from_dyld_image ()
178 path = _dyld_get_image_name (i); 178 path = _dyld_get_image_name (i);
179 if (path != NULL && strlen (path) > 0) 179 if (path != NULL && strlen (path) > 0)
180 { 180 {
181 p = strdup (path); 181 p = GNUNET_strdup (path);
182 s = p + strlen (p); 182 s = p + strlen (p);
183 while ((s > p) && (*s != '/')) 183 while ((s > p) && (*s != '/'))
184 s--; 184 s--;