[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9573 - in GNUnet/src: applications/topology_default util/c
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9573 - in GNUnet/src: applications/topology_default util/containers util/os util/pseudonym util/threads |
Date: |
Wed, 18 Nov 2009 05:40:43 -0700 |
Author: grothoff
Date: 2009-11-18 05:40:43 -0700 (Wed, 18 Nov 2009)
New Revision: 9573
Modified:
GNUnet/src/applications/topology_default/topology.c
GNUnet/src/util/containers/heap.c
GNUnet/src/util/os/console.c
GNUnet/src/util/pseudonym/names.c
GNUnet/src/util/threads/pthread.c
Log:
minor bugfixes and cosmetics
Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2009-11-18 12:33:12 UTC
(rev 9572)
+++ GNUnet/src/applications/topology_default/topology.c 2009-11-18 12:40:43 UTC
(rev 9573)
@@ -478,6 +478,7 @@
_("Could not read friends list `%s'\n"), fn);
return GNUNET_SYSERR;
}
+ return 0;
}
if ((frstat.st_mtime != fInfo.friends_mtime)
|| (frstat.st_size != fInfo.friends_size))
Modified: GNUnet/src/util/containers/heap.c
===================================================================
--- GNUnet/src/util/containers/heap.c 2009-11-18 12:33:12 UTC (rev 9572)
+++ GNUnet/src/util/containers/heap.c 2009-11-18 12:40:43 UTC (rev 9573)
@@ -115,24 +115,16 @@
void *GNUNET_CONTAINER_heap_peek (struct GNUNET_CONTAINER_Heap *root)
{
if ((root == NULL) || (root->root == NULL))
- {
- return NULL;
- }
-
+ return NULL;
return root->root->element;
}
void
GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap)
{
- void *unused;
while (heap->size > 0)
- {
- unused = GNUNET_CONTAINER_heap_remove_root (heap);
- }
-
+ GNUNET_CONTAINER_heap_remove_root (heap);
GNUNET_free (heap);
- return;
}
struct GNUNET_CONTAINER_heap_node *
Modified: GNUnet/src/util/os/console.c
===================================================================
--- GNUnet/src/util/os/console.c 2009-11-18 12:33:12 UTC (rev 9572)
+++ GNUnet/src/util/os/console.c 2009-11-18 12:40:43 UTC (rev 9573)
@@ -89,6 +89,7 @@
GNUNET_GE_ERROR | GNUNET_GE_ADMIN |
GNUNET_GE_USER | GNUNET_GE_BULK, "access",
rdir);
+ GNUNET_free (pif);
GNUNET_free (rdir);
GNUNET_free (user);
return GNUNET_SYSERR;
Modified: GNUnet/src/util/pseudonym/names.c
===================================================================
--- GNUnet/src/util/pseudonym/names.c 2009-11-18 12:33:12 UTC (rev 9572)
+++ GNUnet/src/util/pseudonym/names.c 2009-11-18 12:40:43 UTC (rev 9573)
@@ -81,7 +81,11 @@
fn = GNUNET_pseudonym_internal_get_data_filename_ (ectx,
cfg, PS_NAMES_DIR, &nh);
len = 0;
- GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES);
+ if (GNUNET_OK != GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES))
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
fd = GNUNET_disk_file_open (ectx, fn, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
i = 0;
idx = -1;
Modified: GNUnet/src/util/threads/pthread.c
===================================================================
--- GNUnet/src/util/threads/pthread.c 2009-11-18 12:33:12 UTC (rev 9572)
+++ GNUnet/src/util/threads/pthread.c 2009-11-18 12:40:43 UTC (rev 9573)
@@ -175,18 +175,21 @@
GNUNET_GE_IMMEDIATE,
_("`%s' failed with error code %s: %s\n"),
"pthread_join", "EINVAL", STRERROR (errno));
+ break;
case EDEADLK:
GNUNET_GE_LOG (NULL,
GNUNET_GE_FATAL | GNUNET_GE_USER | GNUNET_GE_DEVELOPER |
GNUNET_GE_IMMEDIATE,
_("`%s' failed with error code %s: %s\n"),
"pthread_join", "EDEADLK", STRERROR (errno));
+ break;
default:
GNUNET_GE_LOG (NULL,
GNUNET_GE_FATAL | GNUNET_GE_USER | GNUNET_GE_DEVELOPER |
GNUNET_GE_IMMEDIATE,
_("`%s' failed with error code %d: %s\n"),
"pthread_join", k, STRERROR (errno));
+ break;
}
GNUNET_GE_ASSERT (NULL, 0);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9573 - in GNUnet/src: applications/topology_default util/containers util/os util/pseudonym util/threads,
gnunet <=