search for: f02acb1

Displaying 2 results from an estimated 2 matches for "f02acb1".

Did you mean: 402abc1
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"); +...
2015 Jun 16
1
[PATCH] btrfs: remove unused 'out' variables
...d, but still) variable. If any of those outputs is needed, a variable for it can be easily added back. --- daemon/btrfs.c | 60 ++++++++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..f02acb1 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1049,7 +1049,6 @@ do_btrfs_quota_enable (const mountable_t *fs, int enable) size_t i = 0; char *fs_buf = NULL; CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; int r = -1; fs_buf = mount (fs); @@ -1065,7 +1064,7 @...