From e578b59bf612178d7727c303102049e62676c308 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 25 Oct 2018 14:10:54 +0200 Subject: btrfs-progs: convert strerror to implicit %m Similar to the changes where strerror(errno) was converted, continue with the remaining cases where the argument was stored in another variable. The savings in object size are about 4500 bytes: $ size btrfs.old btrfs.new text data bss dec hex filename 805055 24248 19748 849051 cf49b btrfs.old 804527 24248 19748 848523 cf28b btrfs.new Signed-off-by: David Sterba --- qgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qgroup.c') diff --git a/qgroup.c b/qgroup.c index 2cfd6dbd..a035579e 100644 --- a/qgroup.c +++ b/qgroup.c @@ -610,8 +610,9 @@ static struct btrfs_qgroup *get_or_add_qgroup( ret = qgroup_tree_insert(qgroup_lookup, bq); if (ret) { - error("failed to insert %llu into tree: %s", - (unsigned long long)bq->qgroupid, strerror(-ret)); + errno = -ret; + error("failed to insert %llu into tree: %m", + (unsigned long long)bq->qgroupid); free(bq); return ERR_PTR(ret); } -- cgit v1.2.3