[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6812 - GNUnet/src/applications/fs/gap
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6812 - GNUnet/src/applications/fs/gap |
Date: |
Mon, 12 May 2008 14:34:20 -0600 (MDT) |
Author: grothoff
Date: 2008-05-12 14:33:56 -0600 (Mon, 12 May 2008)
New Revision: 6812
Modified:
GNUnet/src/applications/fs/gap/test_linear_topology.c
GNUnet/src/applications/fs/gap/test_loopback.c
GNUnet/src/applications/fs/gap/test_multi_results.c
GNUnet/src/applications/fs/gap/test_star_topology.c
Log:
cleanup
Modified: GNUnet/src/applications/fs/gap/test_linear_topology.c
===================================================================
--- GNUnet/src/applications/fs/gap/test_linear_topology.c 2008-05-12
20:33:19 UTC (rev 6811)
+++ GNUnet/src/applications/fs/gap/test_linear_topology.c 2008-05-12
20:33:56 UTC (rev 6812)
@@ -93,6 +93,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (ectx, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
memset (buf, size / 253, sizeof (GNUNET_HashCode));
for (i = 0; i < size - sizeof (GNUNET_HashCode);
@@ -203,6 +208,11 @@
{
fd = GNUNET_disk_file_open (ectx, tmpName, O_RDONLY);
+ if (fd == -1)
+ {
+ GNUNET_free(tmpName);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
in = GNUNET_malloc (size);
memset (buf, size / 253, sizeof (GNUNET_HashCode));
Modified: GNUnet/src/applications/fs/gap/test_loopback.c
===================================================================
--- GNUnet/src/applications/fs/gap/test_loopback.c 2008-05-12 20:33:19 UTC
(rev 6811)
+++ GNUnet/src/applications/fs/gap/test_loopback.c 2008-05-12 20:33:56 UTC
(rev 6812)
@@ -88,6 +88,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (ectx, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
for (i = 0; i < (int) (size - 42 - sizeof (GNUNET_HashCode));
@@ -198,6 +203,11 @@
{
fd = GNUNET_disk_file_open (ectx, tmpName, O_RDONLY);
+ if (fd == -1)
+ {
+ GNUNET_free(tmpName);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
in = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
Modified: GNUnet/src/applications/fs/gap/test_multi_results.c
===================================================================
--- GNUnet/src/applications/fs/gap/test_multi_results.c 2008-05-12 20:33:19 UTC
(rev 6811)
+++ GNUnet/src/applications/fs/gap/test_multi_results.c 2008-05-12 20:33:56 UTC
(rev 6812)
@@ -83,6 +83,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (ectx, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return NULL;
+ }
buf = GNUNET_malloc (size);
memset (buf, size % 255, size);
WRITE (fd, buf, size);
Modified: GNUnet/src/applications/fs/gap/test_star_topology.c
===================================================================
--- GNUnet/src/applications/fs/gap/test_star_topology.c 2008-05-12 20:33:19 UTC
(rev 6811)
+++ GNUnet/src/applications/fs/gap/test_star_topology.c 2008-05-12 20:33:56 UTC
(rev 6812)
@@ -93,6 +93,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (ectx, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc_large (size);
memset (buf, size + size / 253, size);
for (i = 0; i < (int) (size - 42 - sizeof (GNUNET_HashCode));
@@ -141,6 +146,11 @@
{
fd = GNUNET_disk_file_open (ectx, tmpName, O_RDONLY);
+ if (fd == -1)
+ {
+ GNUNET_free (tmpName);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
in = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6812 - GNUnet/src/applications/fs/gap,
gnunet <=