gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17473 - in gnunet/src: dv hostlist transport util


From: gnunet
Subject: [GNUnet-SVN] r17473 - in gnunet/src: dv hostlist transport util
Date: Fri, 14 Oct 2011 09:23:12 +0200

Author: grothoff
Date: 2011-10-14 09:23:11 +0200 (Fri, 14 Oct 2011)
New Revision: 17473

Modified:
   gnunet/src/dv/gnunet-service-dv.c
   gnunet/src/hostlist/hostlist-client.c
   gnunet/src/transport/gnunet-transport-connect-running-peers.c
   gnunet/src/transport/transport-testing.c
   gnunet/src/util/common_logging.c
   gnunet/src/util/os_installation.c
Log:
LRN: Use GNUNET_strdup() instead of strdup()


Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c   2011-10-14 07:22:42 UTC (rev 17472)
+++ gnunet/src/dv/gnunet-service-dv.c   2011-10-14 07:23:11 UTC (rev 17473)
@@ -1489,7 +1489,7 @@
     pos = dn->referee_head;
     while ((NULL != pos) && (pos->referrer_id != sid))
     {
-      sender_id = strdup (GNUNET_i2s (&pos->identity));
+      sender_id = GNUNET_strdup (GNUNET_i2s (&pos->identity));
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "I know sender %u %s\n",
                   pos->referrer_id, sender_id);
       GNUNET_free (sender_id);

Modified: gnunet/src/hostlist/hostlist-client.c
===================================================================
--- gnunet/src/hostlist/hostlist-client.c       2011-10-14 07:22:42 UTC (rev 
17472)
+++ gnunet/src/hostlist/hostlist-client.c       2011-10-14 07:23:11 UTC (rev 
17473)
@@ -443,7 +443,7 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Testing new advertised hostlist if it is obtainable\n");
     current_hostlist = hostlist_to_test;
-    return strdup (hostlist_to_test->hostlist_uri);
+    return GNUNET_strdup (hostlist_to_test->hostlist_uri);
   }
 
   if ((GNUNET_YES == stat_use_bootstrap) || (linked_list_size == 0))
@@ -465,7 +465,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using learned hostlist `%s'\n",
               pos->hostlist_uri);
   current_hostlist = pos;
-  return strdup (pos->hostlist_uri);
+  return GNUNET_strdup (pos->hostlist_uri);
 }
 
 

Modified: gnunet/src/transport/gnunet-transport-connect-running-peers.c
===================================================================
--- gnunet/src/transport/gnunet-transport-connect-running-peers.c       
2011-10-14 07:22:42 UTC (rev 17472)
+++ gnunet/src/transport/gnunet-transport-connect-running-peers.c       
2011-10-14 07:23:11 UTC (rev 17473)
@@ -290,7 +290,7 @@
 testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
 {
   cc = NULL;
-  char *p1_c = strdup (GNUNET_i2s (&p1->id));
+  char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
 
   GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peers connected: %s <-> %s\n", p1_c,
               GNUNET_i2s (&p2->id));

Modified: gnunet/src/transport/transport-testing.c
===================================================================
--- gnunet/src/transport/transport-testing.c    2011-10-14 07:22:42 UTC (rev 
17472)
+++ gnunet/src/transport/transport-testing.c    2011-10-14 07:23:11 UTC (rev 
17473)
@@ -219,7 +219,7 @@
   if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
     return;
 
-  char * p2_s = strdup(GNUNET_i2s (&p2->id));
+  char * p2_s = GNUNET_strdup(GNUNET_i2s (&p2->id));
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
       "Asking peers %u (`%s') to connect peer %u (`%s')\n",
       p1->no, GNUNET_i2s (&p1->id), p2->no, p2_s);
@@ -481,7 +481,7 @@
 char *
 extract_filename (const char *file)
 {
-  char *pch = strdup (file);
+  char *pch = GNUNET_strdup (file);
   char *backup = pch;
   char *filename = NULL;
   char *res;
@@ -501,7 +501,7 @@
   else
     filename = pch;
 
-  res = strdup (filename);
+  res = GNUNET_strdup (filename);
   GNUNET_free (backup);
   return res;
 }

Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c    2011-10-14 07:22:42 UTC (rev 17472)
+++ gnunet/src/util/common_logging.c    2011-10-14 07:23:11 UTC (rev 17473)
@@ -283,16 +283,16 @@
   struct LogDef n;
   memset (&n, 0, sizeof (n));
   if (strlen (component) > 0 && component[0] != '*')
-    n.component = strdup (component);
+    n.component = GNUNET_strdup (component);
   if (strlen (file) > 0 && file[0] != '*')
     {
-      n.file = strdup (file);
+      n.file = GNUNET_strdup (file);
       n.strlen_file = strlen (file);
     }
   if ( (NULL != function) &&
        (strlen (function) > 0) && 
        (function[0] != '*') )
-    n.function = strdup (function);
+    n.function = GNUNET_strdup (function);
   n.from_line = from_line;
   n.to_line = to_line;
   n.level = level;
@@ -403,7 +403,7 @@
   tmp = getenv (constname);
   if (tmp == NULL)
     return 0;
-  def = strdup (tmp);
+  def = GNUNET_strdup (tmp);
   level = -1;
   from_line = 0;
   to_line = INT_MAX;
@@ -532,7 +532,7 @@
   GNUNET_free_non_null (component);
   GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
   GNUNET_free_non_null (component_nopid);
-  component_nopid = strdup (comp);
+  component_nopid = GNUNET_strdup (comp);
 
   env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
   if (env_logfile != NULL)

Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c   2011-10-14 07:22:42 UTC (rev 17472)
+++ gnunet/src/util/os_installation.c   2011-10-14 07:23:11 UTC (rev 17473)
@@ -178,7 +178,7 @@
          path = _dyld_get_image_name (i);
          if (path != NULL && strlen (path) > 0)
            {
-             p = strdup (path);
+             p = GNUNET_strdup (path);
              s = p + strlen (p);
              while ((s > p) && (*s != '/'))
                s--;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]