From 633dc6f80f201afdf5b8524ae377187d58f0ef3b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 12 Jan 2016 11:20:18 +0100 Subject: btrfs-progs: remove unnecessary errno temp variables We can read errno directly if it's not clobbered by any intermediate calls. Signed-off-by: David Sterba --- send-utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'send-utils.c') diff --git a/send-utils.c b/send-utils.c index 51f3d7b8..7dbb0b82 100644 --- a/send-utils.c +++ b/send-utils.c @@ -545,7 +545,6 @@ int subvol_uuid_search_init(int mnt_fd, struct subvol_uuid_search *s) int root_item_valid = 0; unsigned long off = 0; int i; - int e; char *path; s->mnt_fd = mnt_fd; @@ -579,10 +578,9 @@ int subvol_uuid_search_init(int mnt_fd, struct subvol_uuid_search *s) while (1) { ret = ioctl(mnt_fd, BTRFS_IOC_TREE_SEARCH, &args); - e = errno; if (ret < 0) { fprintf(stderr, "ERROR: can't perform the search - %s\n", - strerror(e)); + strerror(errno)); return ret; } if (sk->nr_items == 0) -- cgit v1.2.3