struct sigaction sig;
#endif
- ret = GNUNET_malloc (sizeof (struct GNUNET_SIGNAL_Context));
+ ret = GNUNET_new (struct GNUNET_SIGNAL_Context);
ret->sig = signum;
ret->method = handler;
#ifndef MINGW
GNUNET_SIGNAL_raise (const int sig)
{
struct GNUNET_SIGNAL_Context *ctx;
-
- for (ctx = sc_head; NULL != sc_head; ctx = ctx->next)
+
+ for (ctx = sc_head; NULL != ctx; ctx = ctx->next)
{
if (sig != ctx->sig)
continue;