summaryrefslogtreecommitdiffstats
path: root/dice.c
diff options
context:
space:
mode:
Diffstat (limited to 'dice.c')
-rw-r--r--dice.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dice.c b/dice.c
index 69fc911..3403c59 100644
--- a/dice.c
+++ b/dice.c
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
-#include <sys/random.h>
/* TODO add support for up and down arrows to browse previous entries in the same session */
@@ -74,7 +73,7 @@ parse_dice(const char *s, struct die **dicep, size_t *ndicep)
if (!isdigit(*s) && *s != '-' && *s != 'd' && *s != 'D')
goto invalid;
- dice = erealloc2(dice, ++ndice, sizeof(*dice));
+ dice = ereallocn(dice, ++ndice, sizeof(*dice), 0);
die = &dice[ndice - 1];
die->count = 1;
die->min = 1;