[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33562 - in gnunet-gtk/src: fs lib namestore peerinfo setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33562 - in gnunet-gtk/src: fs lib namestore peerinfo setup |
Date: |
Fri, 6 Jun 2014 13:51:26 +0200 |
Author: grothoff
Date: 2014-06-06 13:51:26 +0200 (Fri, 06 Jun 2014)
New Revision: 33562
Modified:
gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
gnunet-gtk/src/fs/gnunet-fs-gtk_unindex.c
gnunet-gtk/src/lib/animations.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c
gnunet-gtk/src/setup/gnunet-setup-hostlist-server.c
gnunet-gtk/src/setup/gnunet-setup-transport-test.c
gnunet-gtk/src/setup/gnunet-setup-transport.c
Log:
use GNUNET_new where applicable
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2014-06-06 11:47:30 UTC
(rev 33561)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2014-06-06 11:51:26 UTC
(rev 33562)
@@ -1608,7 +1608,7 @@
{
struct AddDirClientContext *adcc;
- adcc = GNUNET_malloc (sizeof (struct AddDirClientContext));
+ adcc = GNUNET_new (struct AddDirClientContext);
adcc->ctx = ctx;
GNUNET_CONTAINER_DLL_insert_tail (ctx->adddir_head, ctx->adddir_tail, adcc);
adcc->directory_scan_bo = *bo;
@@ -1961,7 +1961,7 @@
struct MainPublishingDialogContext *ctx = user_data;
struct EditPublishContext *epc;
- epc = GNUNET_malloc (sizeof (struct EditPublishContext));
+ epc = GNUNET_new (struct EditPublishContext);
epc->tm = ctx->file_info_treemodel;
if (! gtk_tree_selection_get_selected (ctx->file_info_selection, NULL,
&epc->iter))
{
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_unindex.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_unindex.c 2014-06-06 11:47:30 UTC (rev
33561)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_unindex.c 2014-06-06 11:51:26 UTC (rev
33562)
@@ -214,7 +214,7 @@
g_free (filename);
return;
}
- ue = GNUNET_malloc (sizeof (struct UnindexEntry));
+ ue = GNUNET_new (struct UnindexEntry);
ue->filesize = filesize;
GNUNET_CONTAINER_DLL_insert (ue_head, ue_tail, ue);
ue->filename = GNUNET_strdup (filename);
@@ -443,7 +443,7 @@
{
struct UnindexEntry *ue;
- ue = GNUNET_malloc (sizeof (struct UnindexEntry));
+ ue = GNUNET_new (struct UnindexEntry);
ue->filename = GNUNET_strdup (filename);
if (NULL != emsg)
ue->emsg = GNUNET_strdup (emsg);
Modified: gnunet-gtk/src/lib/animations.c
===================================================================
--- gnunet-gtk/src/lib/animations.c 2014-06-06 11:47:30 UTC (rev 33561)
+++ gnunet-gtk/src/lib/animations.c 2014-06-06 11:51:26 UTC (rev 33562)
@@ -138,7 +138,7 @@
GError *err = NULL;
struct GNUNET_FS_AnimationContext *ac;
- ac = GNUNET_malloc (sizeof (struct GNUNET_FS_AnimationContext));
+ ac = GNUNET_new (struct GNUNET_FS_AnimationContext);
ac->ani = gdk_pixbuf_animation_new_from_file (filename, &err);
if (NULL == ac->ani)
{
@@ -299,7 +299,7 @@
{
struct GNUNET_FS_AnimationTreeViewHandle *atv;
- atv = GNUNET_malloc (sizeof (struct GNUNET_FS_AnimationTreeViewHandle));
+ atv = GNUNET_new (struct GNUNET_FS_AnimationTreeViewHandle);
atv->tv = tv;
atv->image_col = image_col;
GNUNET_CONTAINER_DLL_insert (atv_head,
Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c 2014-06-06 11:47:30 UTC
(rev 33561)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c 2014-06-06 11:51:26 UTC
(rev 33562)
@@ -77,7 +77,7 @@
*/
static int
srv_validate (void *cls,
- GtkBuilder *builder)
+ GtkBuilder *builder)
{
GtkEditable *entry;
const gchar *preedit;
@@ -116,7 +116,7 @@
plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
plugin->cls = env;
plugin->dialog_glade_filename = "gnunet_namestore_edit_srv.glade";
- plugin->dialog_widget_name = "edit_a_dialog";
+ plugin->dialog_widget_name = "edit_srv_dialog";
plugin->symbols = symbols;
plugin->load = &srv_load;
plugin->store = &srv_store;
Modified: gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c
===================================================================
--- gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c 2014-06-06 11:47:30 UTC
(rev 33561)
+++ gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c 2014-06-06 11:51:26 UTC
(rev 33562)
@@ -104,7 +104,7 @@
DIR_SEPARATOR_STR, mcc);
GNUNET_free (dir);
flagBuf = gdk_pixbuf_new_from_file (fn, NULL);
- pos = GNUNET_malloc (sizeof (struct Flag));
+ pos = GNUNET_new (struct Flag);
pos->cc = mcc;
pos->flag = flagBuf;
GNUNET_CONTAINER_DLL_insert (flags_head, flags_tail, pos);
Modified: gnunet-gtk/src/setup/gnunet-setup-hostlist-server.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-hostlist-server.c 2014-06-06 11:47:30 UTC
(rev 33561)
+++ gnunet-gtk/src/setup/gnunet-setup-hostlist-server.c 2014-06-06 11:51:26 UTC
(rev 33562)
@@ -158,7 +158,7 @@
struct CommandContext *ctx;
char *binary;
- ctx = GNUNET_malloc (sizeof (struct CommandContext));
+ ctx = GNUNET_new (struct CommandContext);
ctx->callback = callback;
ctx->callback_cls = cls;
ctx->found = GNUNET_NO;
Modified: gnunet-gtk/src/setup/gnunet-setup-transport-test.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-transport-test.c 2014-06-06 11:47:30 UTC
(rev 33561)
+++ gnunet-gtk/src/setup/gnunet-setup-transport-test.c 2014-06-06 11:51:26 UTC
(rev 33562)
@@ -170,7 +170,7 @@
GNUNET_CONFIGURATION_get_value_number (cfg, section_name,
"ADVERTISED_PORT", &adv_port))
adv_port = bnd_port;
- tc = GNUNET_malloc (sizeof (struct TestContext));
+ tc = GNUNET_new (struct TestContext);
tc->success_image = success_image;
tc->failure_image = failure_image;
w = GTK_WIDGET (GNUNET_SETUP_get_object (success_image));
Modified: gnunet-gtk/src/setup/gnunet-setup-transport.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-transport.c 2014-06-06 11:47:30 UTC
(rev 33561)
+++ gnunet-gtk/src/setup/gnunet-setup-transport.c 2014-06-06 11:51:26 UTC
(rev 33562)
@@ -169,7 +169,7 @@
* @param result error status
*/
static void
-result_callback (void *cls,
+result_callback (void *cls,
enum GNUNET_NAT_FailureCode result)
{
struct GNUNET_SetupAutoContext *ac = cls;
@@ -184,7 +184,7 @@
: _("NAT traversal with ICMP Server failed.\n"));
update_icmp_server_enable_button ((GNUNET_NAT_ERROR_SUCCESS == result));
if (NULL != cfg)
- GNUNET_CONFIGURATION_set_value_string (cfg,
+ GNUNET_CONFIGURATION_set_value_string (cfg,
"nat",
"ENABLE_ICMP_SERVER",
(GNUNET_NAT_ERROR_SUCCESS == result)
@@ -237,7 +237,7 @@
GNUNET_RESOLVER_connect (cfg);
ac->tst = GNUNET_NAT_test_start (cfg,
GNUNET_YES,
- 0, 0,
+ 0, 0,
&result_callback, ac);
if (NULL == ac->tst)
{
@@ -538,7 +538,7 @@
{
struct GNUNET_SetupAutoContext *ac;
- ac = GNUNET_malloc (sizeof (struct GNUNET_SetupAutoContext));
+ ac = GNUNET_new (struct GNUNET_SetupAutoContext);
ac->fin_cb = fin_cb;
ac->fin_cb_cls = fin_cb_cls;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33562 - in gnunet-gtk/src: fs lib namestore peerinfo setup,
gnunet <=