]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
string: Rename para_malloc() -> alloc().
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index e0bde7fc78c8365f33aa8e5aae9f751a3dabb751..215e8bf2c2807febd50ebe3c98e8af1ef05a1e75 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -412,7 +412,7 @@ static void load_chunk_table(struct afh_info *afhi, const struct osl_object *ct)
                return;
        }
        sz  = PARA_MIN(((size_t)afhi->chunks_total + 1) * 4, ct->size) + 1;
-       afhi->chunk_table = para_malloc(sz);
+       afhi->chunk_table = alloc(sz);
        for (i = 0; i <= afhi->chunks_total && i * 4 + 3 < ct->size; i++)
                afhi->chunk_table[i] = read_u32(ct->data + 4 * i);
 }
@@ -1066,7 +1066,7 @@ again:
        if (ret < 0)
                return ret;
        if (!d->hash)
-               d->hash = para_malloc(HASH_SIZE);
+               d->hash = alloc(HASH_SIZE);
        memcpy(d->hash, tmp_hash, HASH_SIZE);
        free(d->path);
        ret = get_audio_file_path_of_row(current_aft_row, &d->path);
@@ -1224,7 +1224,7 @@ static int sort_matching_paths(struct ls_options *options)
        int (*compar)(const void *, const void *);
        int i;
 
-       options->data_ptr = para_malloc(nmemb * sizeof(*options->data_ptr));
+       options->data_ptr = alloc(nmemb * sizeof(*options->data_ptr));
        for (i = 0; i < nmemb; i++)
                options->data_ptr[i] = options->data + i;
 
@@ -1424,7 +1424,7 @@ static int com_ls(struct command_context *cc, struct lls_parse_result *lpr)
        ret = lls_serialize_parse_result(lpr, cmd, NULL, &query.size);
        assert(ret >= 0);
        query.size += sizeof(*opts);
-       query.data = para_malloc(query.size);
+       query.data = alloc(query.size);
        opts = query.data;
        memset(opts, 0, sizeof(*opts));
        slpr = query.data + sizeof(*opts);
@@ -1553,7 +1553,7 @@ static void save_add_callback_buffer(unsigned char *hash, const char *path,
        size_t afhi_size = sizeof_afhi_buf(afhi);
        size_t size = CAB_PATH_OFFSET + path_len + afhi_size
                + sizeof_chunk_table(afhi) + slpr_size;
-       char *buf = para_malloc(size);
+       char *buf = alloc(size);
        uint32_t pos;
 
        assert(size <= ~(uint32_t)0);
@@ -2320,7 +2320,7 @@ static int com_setatt_callback(struct afs_callback_arg *aca)
                                goto out; /* no attribute modifier given */
                        goto set_atts;
                }
-               p = para_malloc(len);
+               p = alloc(len);
                memcpy(p, arg, len - 1);
                p[len - 1] = '\0';
                ret = get_attribute_bitnum_by_name(p, &bitnum);