[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34979 - in gnunet/src: gns testbed testing transport util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34979 - in gnunet/src: gns testbed testing transport util |
Date: |
Sun, 25 Jan 2015 00:01:29 +0100 |
Author: LRN
Date: 2015-01-25 00:01:29 +0100 (Sun, 25 Jan 2015)
New Revision: 34979
Modified:
gnunet/src/gns/gnunet-dns2gns.c
gnunet/src/testbed/testbed_api_hosts.c
gnunet/src/testing/testing.c
gnunet/src/transport/test_plugin_transport.c
gnunet/src/util/helper.c
gnunet/src/util/test_plugin.c
Log:
Fix the use of (GNUNET_)strdup and (GNUNET_)free
Modified: gnunet/src/gns/gnunet-dns2gns.c
===================================================================
--- gnunet/src/gns/gnunet-dns2gns.c 2015-01-24 23:01:25 UTC (rev 34978)
+++ gnunet/src/gns/gnunet-dns2gns.c 2015-01-24 23:01:29 UTC (rev 34979)
@@ -357,7 +357,7 @@
break;
case GNUNET_DNSPARSER_TYPE_CNAME:
rec.name = GNUNET_strdup (packet->queries[0].name);
- rec.data.hostname = strdup (rd[i].data);
+ rec.data.hostname = GNUNET_strdup (rd[i].data);
rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET;
rec.type = GNUNET_DNSPARSER_TYPE_CNAME;
memcpy (rec.data.hostname,
Modified: gnunet/src/testbed/testbed_api_hosts.c
===================================================================
--- gnunet/src/testbed/testbed_api_hosts.c 2015-01-24 23:01:25 UTC (rev
34978)
+++ gnunet/src/testbed/testbed_api_hosts.c 2015-01-24 23:01:29 UTC (rev
34979)
@@ -765,7 +765,7 @@
for (argp = 0; NULL != argv[argp]; argp++) ;
argv_dup = GNUNET_malloc (sizeof (char *) * (argp + 1));
for (argp = 0; NULL != argv[argp]; argp++)
- argv_dup[argp] = strdup (argv[argp]);
+ argv_dup[argp] = GNUNET_strdup (argv[argp]);
return argv_dup;
}
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2015-01-24 23:01:25 UTC (rev 34978)
+++ gnunet/src/testing/testing.c 2015-01-24 23:01:29 UTC (rev 34979)
@@ -1253,11 +1253,11 @@
{
/* No prefix */
GNUNET_asprintf(&peer->main_binary, "%s", libexec_binary);
- peer->args = strdup ("");
+ peer->args = GNUNET_strdup ("");
}
else
{
- peer->args = strdup (libexec_binary);
+ peer->args = GNUNET_strdup (libexec_binary);
}
peer->system = system;
peer->key_number = key_number;
@@ -1724,10 +1724,10 @@
{
/* No prefix */
GNUNET_asprintf(&peer->main_binary, "%s", libexec_binary);
- peer->args = strdup ("");
+ peer->args = GNUNET_strdup ("");
}
else
- peer->args = strdup (libexec_binary);
+ peer->args = GNUNET_strdup (libexec_binary);
GNUNET_free (libexec_binary);
GNUNET_free (binary);
Modified: gnunet/src/transport/test_plugin_transport.c
===================================================================
--- gnunet/src/transport/test_plugin_transport.c 2015-01-24 23:01:25 UTC
(rev 34978)
+++ gnunet/src/transport/test_plugin_transport.c 2015-01-24 23:01:29 UTC
(rev 34979)
@@ -348,7 +348,7 @@
GNUNET_CONTAINER_DLL_insert(head, tail, w);
got_reply = GNUNET_NO;
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Testing: address_to_string \n");
- w->addrstring = strdup (
+ w->addrstring = GNUNET_strdup (
api->address_to_string (api, w->address->address,
w->address->address_length));
if (NULL == w->addrstring)
Modified: gnunet/src/util/helper.c
===================================================================
--- gnunet/src/util/helper.c 2015-01-24 23:01:25 UTC (rev 34978)
+++ gnunet/src/util/helper.c 2015-01-24 23:01:29 UTC (rev 34979)
@@ -498,7 +498,7 @@
if (NULL != strstr (binary_name, "gnunet"))
h->binary_name = GNUNET_OS_get_libexec_binary_path (binary_name);
else
- h->binary_name = strdup (binary_name);
+ h->binary_name = GNUNET_strdup (binary_name);
for (c = 0; NULL != binary_argv[c]; c++);
h->binary_argv = GNUNET_malloc (sizeof (char *) * (c + 1));
for (c = 0; NULL != binary_argv[c]; c++)
Modified: gnunet/src/util/test_plugin.c
===================================================================
--- gnunet/src/util/test_plugin.c 2015-01-24 23:01:25 UTC (rev 34978)
+++ gnunet/src/util/test_plugin.c 2015-01-24 23:01:29 UTC (rev 34979)
@@ -35,7 +35,7 @@
ret = GNUNET_PLUGIN_unload (libname, "out");
GNUNET_assert (NULL != ret);
GNUNET_assert (0 == strcmp (ret, "World"));
- GNUNET_free (ret);
+ free (ret);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34979 - in gnunet/src: gns testbed testing transport util,
gnunet <=