]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - play.c
string: Introduce arr_alloc().
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index d46c16cdfc4222816d52b2d9e248bee07b880025..926850134cda899268501b7c90f408f7b2b80cb5 100644 (file)
--- a/play.c
+++ b/play.c
@@ -288,7 +288,7 @@ static int shuffle_compare(__a_unused const void *a, __a_unused const void *b)
 static void init_shuffle_map(void)
 {
        unsigned n, num_inputs = lls_num_inputs(play_lpr);
-       shuffle_map = alloc(num_inputs * sizeof(unsigned));
+       shuffle_map = arr_alloc(num_inputs, sizeof(unsigned));
        for (n = 0; n < num_inputs; n++)
                shuffle_map[n] = n;
        if (!OPT_GIVEN(RANDOMIZE))
@@ -651,7 +651,7 @@ static char **get_mapped_keyseqs(void)
        char **result;
        int i;
 
-       result = alloc((NUM_MAPPED_KEYS + 1) * sizeof(char *));
+       result = arr_alloc(NUM_MAPPED_KEYS + 1, sizeof(char *));
        FOR_EACH_MAPPED_KEY(i) {
                char *seq = get_key_map_seq(i);
                result[i] = seq;