Fix logic bug introduced on 2007-05-06.
[gnulib.git] / lib / fatal-signal.c
index f85b60f..3862b79 100644 (file)
@@ -1,5 +1,5 @@
 /* Emergency actions in case of a fatal signal.
-   Copyright (C) 2003-2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -27,7 +27,6 @@
 #include <signal.h>
 #include <unistd.h>
 
-#include "sigprocmask.h"
 #include "xalloc.h"
 
 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
@@ -206,7 +205,7 @@ at_fatal_signal (action_t action)
       size_t old_actions_allocated = actions_allocated;
       size_t new_actions_allocated = 2 * actions_allocated;
       actions_entry_t *new_actions =
-       xmalloc (new_actions_allocated * sizeof (actions_entry_t));
+       XNMALLOC (new_actions_allocated, actions_entry_t);
       size_t k;
 
       /* Don't use memcpy() here, because memcpy takes non-volatile arguments