Displaying 6 results from an estimated 6 matches for "7b14bac".
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 mountable_t *fs)
ret->guestfs_int_btrfssubvolume_list_val =
calloc (nr_subvolumes, sizeof (struct guestfs_int_btrfssubvolume));
if (ret->guestfs_int_btrfssubvolume_list_val...
2015 Jun 17
1
Re: [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...u.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 7b14bac..8d03caa 100644
> --- a/daemon/btrfs.c
> +++ b/daemon/btrfs.c
> @@ -1249,7 +1249,7 @@ do_btrfs_qgroup_show (const char *path)
> CLEANUP_FREE char *err = NULL;
> CLEANUP_FREE char *out = NULL;
> int r;
> - char **lines;
> + CLEANUP_FREE_STRING_LIST char **lines = N...
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 16
1
[PATCH] btrfs: use calloc instead of malloc+memset
Small optimization, and eases the code.
---
daemon/btrfs.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index f02acb1..7b14bac 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1723,12 +1723,11 @@ do_btrfs_balance_status (const char *path)
nlines = count_strings (lines);
- ret = malloc(sizeof *ret);
+ ret = calloc (1, sizeof *ret);
if (ret == NULL) {
- reply_with_perror ("malloc");
+ reply_wi...
2015 Jun 17
0
Re: [PATCH] btrfs: keep calloc and its error message match
...ut 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->guestf...
2015 Jun 17
0
[PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...ff-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 7b14bac..8d03caa 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1249,7 +1249,7 @@ do_btrfs_qgroup_show (const char *path)
CLEANUP_FREE char *err = NULL;
CLEANUP_FREE char *out = NULL;
int r;
- char **lines;
+ CLEANUP_FREE_STRING_LIST char **lines = NULL;
path_buf = sysroot_path (path)...