gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r14381 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r14381 - gnunet/src/util
Date: Wed, 9 Feb 2011 12:46:06 +0100

Author: nevans
Date: 2011-02-09 12:46:06 +0100 (Wed, 09 Feb 2011)
New Revision: 14381

Modified:
   gnunet/src/util/scheduler.c
Log:
assert fd's are in valid range

Modified: gnunet/src/util/scheduler.c
===================================================================
--- gnunet/src/util/scheduler.c 2011-02-09 11:45:33 UTC (rev 14380)
+++ gnunet/src/util/scheduler.c 2011-02-09 11:46:06 UTC (rev 14381)
@@ -1219,6 +1219,7 @@
   t->backtrace_strings = backtrace_symbols(backtrace_array, 
t->num_backtrace_strings);
 #endif
   t->read_fd = rfd;
+  GNUNET_assert(wfd >= -1);
   t->write_fd = wfd;
   t->id = ++last_id;
 #if PROFILE_DELAYS
@@ -1328,6 +1329,7 @@
   GNUNET_NETWORK_fdset_destroy (ws);
   return ret;
 #else
+  GNUNET_assert(GNUNET_NETWORK_get_fd(wfd) >= 0);
   return add_without_sets (delay,
                           -1,
                           GNUNET_NETWORK_get_fd (wfd),
@@ -1421,6 +1423,7 @@
   int fd;
 
   GNUNET_DISK_internal_file_handle_ (wfd, &fd, sizeof (int));
+  GNUNET_assert(fd >= 0);
   return add_without_sets (delay,
                           -1,
                           fd,




reply via email to

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