On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote:
> @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct fuse_session *se)
> {
> struct fuse_req *req;
>
> - req = (struct fuse_req *)calloc(1, sizeof(struct fuse_req));
> + req = g_try_new(struct fuse_req, 1);
g_try_new0() since the original call was calloc(3)?
> @@ -411,7 +411,7 @@ static int lo_map_grow(struct lo_map *map, size_t new_nelems)
> return 1;
> }
>
> - new_elems = realloc(map->elems, sizeof(map->elems[0]) * new_nelems);
> + new_elems = g_realloc_n(map->elems, new_nelems, sizeof(map->elems[0]));
g_try_realloc_n() since failure is handled below?
Stefan
Hello Mr. Stefan,
You're correct. I'm really sorry for such small and strangely obvious errors.
If the patch is going to be ACKed, will you edit those problems or shall I fix them and
resend the patch again alone?