similar to: [PATCH] btrfs: use calloc instead of malloc+memset

Displaying 20 results from an estimated 2000 matches similar to: "[PATCH] btrfs: use calloc instead of malloc+memset"

2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
After the previous refactoring, we are able to link the daemon to common/utils, and also remove some of the "duplicate" functions that the daemon carried ("duplicate" in quotes because they were often not exact duplicates). Also this removes the duplicate reimplementation of (most) cleanup functions in the daemon, since those are provided by libutils now. It also allows us in
2015 Jun 11
0
Re: [PATCH] New API: btrfs_filesystem_show_all
Hi, On Thursday 11 June 2015 12:24:18 Chen Hanxiao wrote: > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > daemon/btrfs.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++ > generator/actions.ml | 19 ++++++ > generator/structs.ml | 13 ++++ > src/MAX_PROC_NR | 2 +- > 4 files changed, 209 insertions(+), 1 deletion(-) >
2015 Jun 11
1
Re: [PATCH] New API: btrfs_filesystem_show_all
Hi, > -----Original Message----- > From: libguestfs-bounces@redhat.com [mailto:libguestfs-bounces@redhat.com] On > Behalf Of Pino Toscano > Sent: Thursday, June 11, 2015 5:37 PM > To: libguestfs@redhat.com > Subject: Re: [Libguestfs] [PATCH] New API: btrfs_filesystem_show_all > > Hi, > > On Thursday 11 June 2015 12:24:18 Chen Hanxiao wrote: > > Signed-off-by:
2015 Feb 13
0
[PATCH v4 1/2] New API: btrfs_balance_status
From: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 126 +++++++++++++++++++++++++++++++ generator/actions.ml | 10 +++ generator/structs.ml | 12 +++ gobject/Makefile.inc | 2 +
2015 Feb 11
0
[PATCH v3 1/2] New API: btrfs_balance_status
From: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 123 +++++++++++++++++++++++++++++++ generator/actions.ml | 10 +++ generator/structs.ml | 12 +++ gobject/Makefile.inc | 2 +
2015 Feb 13
1
Re: [PATCH v4 1/2] New API: btrfs_balance_status
On Fri, Feb 13, 2015 at 06:06:54PM +0800, Chen Hanxiao wrote: > From: Hu Tao <hutao@cn.fujitsu.com> > > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > daemon/btrfs.c | 126 +++++++++++++++++++++++++++++++ > generator/actions.ml | 10 +++ >
2015 Jun 17
2
[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
2015 Jun 17
1
Re: [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
On Wednesday 17 June 2015 16:19:31 Chen Hanxiao wrote: > We should not use tmp lines buffer as return value, > for lines buffer will be freed. s/tmp/temporary/ > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > v4: take advantage of sscanf's '%m'. > v3: fix test case failure > > daemon/btrfs.c | 40
2015 Jun 17
0
Re: [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
2015 Jun 17
0
[PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
We should not use tmp lines buffer as return value, for lines buffer will be freed. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- v4: take advantage of sscanf's '%m'. v3: fix test case failure daemon/btrfs.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index
2015 Feb 11
0
[PATCH v3 2/2] New API: btfs_scrub_status
From: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 140 +++++++++++++++++++++++++++++++ generator/actions.ml | 16 ++++ generator/structs.ml | 22 +++++ gobject/Makefile.inc | 2 +
2017 Nov 03
1
[PATCH] daemon: btrfs: fix bad handling of a couple of errors
Remove two wrong error handling situations in btrfs_balance_status: - if the calloc for 'ret' fails, the 'goto error' would try to dereference the resulting null pointer (to free the items of the return struct); hence, just return null directly, instead of jumping to 'error' - if the strdup() for 'btrfsbalance_status' fails, then the directly return would
2018 Aug 06
1
[PATCH] btrfs_balance_status: delay allocation of 'ret'
Allocate 'ret' as late as possible, so there is no risk that early returns will leak it. --- daemon/btrfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 26757d4fb..5c4be6cf7 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1683,12 +1683,6 @@ do_btrfs_balance_status (const char *path) nlines =
2015 Jun 11
2
[PATCH] New API: btrfs_filesystem_show_all
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 19 ++++++ generator/structs.ml | 13 ++++ src/MAX_PROC_NR | 2 +- 4 files changed, 209 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..09f7615 100644 --- a/daemon/btrfs.c +++
2015 Jun 17
6
[PATCH v4 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST v4: remove some redundant strdup v3: fix test case failure v2: properly initialize lines Chen Hanxiao (3): do_btrfs_qgroup_show: fix a bad return value do_btrfs_subvolume_list: fix a bad return value btrfs: use CLEANUP_FREE_STRING_LIST for list free daemon/btrfs.c | 70
2015 Jun 12
1
[PATCH] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..fd93d43 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -409,7 +409,7 @@ umount (char *fs_buf, const
2015 Jun 12
1
[PATCH v2] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- v2: initialize variable of CLEANUP_FREE_STRING_LIST to null daemon/btrfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..3ca39ab 100644 --- a/daemon/btrfs.c +++
2015 Jun 15
0
[PATCH v2 3/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
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 c1462fd..5d87f53 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1704,10 +1704,10 @@ do_btrfs_balance_status (const char *path) size_t i = 0; CLEANUP_FREE char *path_buf = NULL; CLEANUP_FREE
2015 Jun 17
0
[PATCH v4 3/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
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 5361984..88be9ec 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1692,10 +1692,10 @@ do_btrfs_balance_status (const char *path) size_t i = 0; CLEANUP_FREE char *path_buf = NULL; CLEANUP_FREE
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/blkid.c | 2 +- daemon/btrfs.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/daemon/blkid.c b/daemon/blkid.c index 1ac42b4..74d2fa6 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -199,7 +199,7 @@ error: } static char ** -blkid_without_p_i_opt(const char