aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/common_allocation.c6
-rw-r--r--src/util/common_logging.c4
-rw-r--r--src/util/crypto_random.c2
-rw-r--r--src/util/mq.c4
-rw-r--r--src/util/network.c2
-rw-r--r--src/util/os_installation.c4
-rw-r--r--src/util/scheduler.c4
-rw-r--r--src/util/test_mq_client.c2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index f89af191ca..c31ad62534 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -72,7 +72,7 @@ GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber)
if (ret == NULL)
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "malloc");
- GNUNET_abort ();
+ GNUNET_assert (0);
}
return ret;
}
@@ -108,7 +108,7 @@ GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
if (ret == NULL)
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "malloc");
- GNUNET_abort ();
+ GNUNET_assert (0);
}
#ifdef W32_MEM_LIMIT
*((size_t *) ret) = size;
@@ -178,7 +178,7 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber)
if ((NULL == ptr) && (n > 0))
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "realloc");
- GNUNET_abort ();
+ GNUNET_assert (0);
}
#ifdef W32_MEM_LIMIT
ptr = &((size_t *) ptr)[1];
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 747b80a637..695b49913e 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -281,7 +281,7 @@ resize_logdefs ()
* Abort the process, generate a core dump if possible.
*/
void
-GNUNET_abort ()
+GNUNET_abort_ ()
{
#if WINDOWS
DebugBreak ();
@@ -1253,7 +1253,7 @@ GNUNET_util_cl_init ()
#endif
#if WINDOWS
if (!InitializeCriticalSectionAndSpinCount (&output_message_cs, 0x00000400))
- GNUNET_abort ();
+ GNUNET_abort_ ();
#endif
}
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c
index 616f5534c5..2960af17ee 100644
--- a/src/util/crypto_random.c
+++ b/src/util/crypto_random.c
@@ -283,7 +283,7 @@ GNUNET_CRYPTO_random_init ()
FPRINTF (stderr,
_("libgcrypt has not the expected version (version %s is required).\n"),
NEED_LIBGCRYPT_VERSION);
- GNUNET_abort ();
+ GNUNET_assert (0);
}
if ((rc = gcry_control (GCRYCTL_DISABLE_SECMEM, 0)))
FPRINTF (stderr,
diff --git a/src/util/mq.c b/src/util/mq.c
index b73cf176f9..14e0816e28 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -398,9 +398,9 @@ const struct GNUNET_MessageHeader *
GNUNET_MQ_impl_current (struct GNUNET_MQ_Handle *mq)
{
if (NULL == mq->current_envelope)
- GNUNET_abort ();
+ GNUNET_assert (0);
if (NULL == mq->current_envelope->mh)
- GNUNET_abort ();
+ GNUNET_assert (0);
return mq->current_envelope->mh;
}
diff --git a/src/util/network.c b/src/util/network.c
index 22e77818da..63dfe330bf 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -1923,7 +1923,7 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
wfds ? awrite.fd_count : 0,
aexcept.fd_count,
GetLastError ());
- GNUNET_abort ();
+ GNUNET_assert (0);
}
/* Check aexcept, if something is in there and we copied that
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index cf3c027e96..bc7e495127 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -173,7 +173,7 @@ get_path_from_module_filename ()
real_pathlen = GetModuleFileNameW (dll_instance, modulepath, pathlen * sizeof (wchar_t));
} while (real_pathlen >= pathlen && pathlen < 16*1024);
if (real_pathlen >= pathlen)
- GNUNET_abort ();
+ GNUNET_assert (0);
/* To be safe */
modulepath[real_pathlen] = '\0';
@@ -215,7 +215,7 @@ get_path_from_module_filename ()
/* modulepath is GNUNET_PREFIX */
u8_string = u16_to_u8 (modulepath, wcslen (modulepath), NULL, &u8_string_length);
if (NULL == u8_string)
- GNUNET_abort ();
+ GNUNET_assert (0);
upath = GNUNET_malloc (u8_string_length + 1);
memcpy (upath, u8_string, u8_string_length);
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 351b20f22f..d78de94689 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -580,7 +580,7 @@ run_ready (struct GNUNET_NETWORK_FDSet *rs,
if ((0 != (tc.reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) &&
(-1 != pos->write_fd) &&
(!GNUNET_NETWORK_fdset_test_native (ws, pos->write_fd)))
- GNUNET_abort (); // added to ready in previous select loop!
+ GNUNET_assert (0); // added to ready in previous select loop!
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Running task: %p\n",
pos);
@@ -801,7 +801,7 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_TaskCallback task,
"system");
#endif
#endif
- GNUNET_abort ();
+ GNUNET_assert (0);
break;
}
if ( (0 == ret) &&
diff --git a/src/util/test_mq_client.c b/src/util/test_mq_client.c
index a8a1a64a03..61e027df55 100644
--- a/src/util/test_mq_client.c
+++ b/src/util/test_mq_client.c
@@ -105,7 +105,7 @@ send_cb (void *cls)
static void
send_trap_cb (void *cls)
{
- GNUNET_abort ();
+ GNUNET_assert (0);
}