Chen Hanxiao
2015-Jun-17 02:44 UTC
[Libguestfs] [PATCH] btrfs: keep calloc and its error message match
commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d left some error messages unchanged. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 7b14bac..e8059db 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -479,7 +479,7 @@ do_btrfs_subvolume_list (const mountable_t *fs) ret->guestfs_int_btrfssubvolume_list_val calloc (nr_subvolumes, sizeof (struct guestfs_int_btrfssubvolume)); if (ret->guestfs_int_btrfssubvolume_list_val == NULL) { - reply_with_perror ("malloc"); + reply_with_perror ("calloc"); goto error; } @@ -1292,7 +1292,7 @@ do_btrfs_qgroup_show (const char *path) ret->guestfs_int_btrfsqgroup_list_val calloc (nr_qgroups, sizeof (struct guestfs_int_btrfsqgroup)); if (ret->guestfs_int_btrfsqgroup_list_val == NULL) { - reply_with_perror ("malloc"); + reply_with_perror ("calloc"); goto error; } -- 2.1.0
Pino Toscano
2015-Jun-17 09:07 UTC
Re: [Libguestfs] [PATCH] btrfs: keep calloc and its error message match
On Wednesday 17 June 2015 10:44:09 Chen Hanxiao wrote:> commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d > left some error messages unchanged.That commit was about converting a couple of malloc+memset to calloc, not about replacing messages in other parts. Hence, this note is wrong.> > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > daemon/btrfs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 7b14bac..e8059db 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -479,7 +479,7 @@ do_btrfs_subvolume_list (const mountable_t *fs) > ret->guestfs_int_btrfssubvolume_list_val > calloc (nr_subvolumes, sizeof (struct guestfs_int_btrfssubvolume)); > if (ret->guestfs_int_btrfssubvolume_list_val == NULL) { > - reply_with_perror ("malloc"); > + reply_with_perror ("calloc"); > goto error; > } > > @@ -1292,7 +1292,7 @@ do_btrfs_qgroup_show (const char *path) > ret->guestfs_int_btrfsqgroup_list_val > calloc (nr_qgroups, sizeof (struct guestfs_int_btrfsqgroup)); > if (ret->guestfs_int_btrfsqgroup_list_val == NULL) { > - reply_with_perror ("malloc"); > + reply_with_perror ("calloc"); > goto error; > }LGTM, so pushed with the amend above to the commit message. Thanks, -- Pino Toscano
Chen, Hanxiao
2015-Jun-17 09:19 UTC
Re: [Libguestfs] [PATCH] btrfs: keep calloc and its error message match
> -----Original Message----- > From: libguestfs-bounces@redhat.com [mailto:libguestfs-bounces@redhat.com] On > Behalf Of Pino Toscano > Sent: Wednesday, June 17, 2015 5:08 PM > To: libguestfs@redhat.com > Subject: Re: [Libguestfs] [PATCH] btrfs: keep calloc and its error message match > > On Wednesday 17 June 2015 10:44:09 Chen Hanxiao wrote: > > commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d > > left some error messages unchanged. > > That commit was about converting a couple of malloc+memset to calloc, > not about replacing messages in other parts. Hence, this note is wrong. >Thanks for your amending. Regards, - Chen
Possibly Parallel Threads
- [PATCH] btrfs: keep calloc and its error message match
- [PATCH] btrfs: remove redundant whitespace
- Re: [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
- [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
- [PATCH v5 1/2] do_btrfs_qgroup_show: fix a bad return value