threads / discuss / 4105

(patch) calloc->xcalloc in read-cache.c

Subject: (patch) calloc->xcalloc in read-cache.c

## tl;dr

2 messages between May 8, 2006 and May 8, 2006.

replies: 1people: 2as markdown or json

Yakov Lerner· May 8, 2006, 18:01 UTC · lore

--- read-cache.c.000 2006-05-08 15:13:57.000000000 +0000 +++ read-cache.c 2006-05-08 15:15:35.000000000 +0000

@@ -557,7 +557,7 @@

        active_nr = ntohl(hdr->hdr_entries);
        active_alloc = alloc_nr(active_nr);
-       active_cache = calloc(active_alloc, sizeof(struct cache_entry *));
+       active_cache = xcalloc(active_alloc, sizeof(struct cache_entry *));

        offset = sizeof(*hdr);
        for (i = 0; i < active_nr; i++) {

Yakov
Junio C Hamano· May 8, 2006, 20:54 UTC · re: Yakov Lerner · lore

Re: (patch) calloc->xcalloc in read-cache.c

"Yakov Lerner" <iler.ml@gmail.com> writes:
Show 13 quoted lines
> --- read-cache.c.000    2006-05-08 15:13:57.000000000 +0000
> +++ read-cache.c        2006-05-08 15:15:35.000000000 +0000
> @@ -557,7 +557,7 @@
>
>        active_nr = ntohl(hdr->hdr_entries);
>        active_alloc = alloc_nr(active_nr);
> -       active_cache = calloc(active_alloc, sizeof(struct cache_entry *));
> +       active_cache = xcalloc(active_alloc, sizeof(struct cache_entry *));
>
>        offset = sizeof(*hdr);
>        for (i = 0; i < active_nr; i++) {
>
> Yakov

While I do not mind hand generated patch, your mailer setting seems to be seriously broken.

Mind checking Documentation/SubmittingPatches and try again?

← back to recent threads