btrfs-progs: send-stream: don't use single letter variable in tlv_get

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2016-11-15 14:55:22 +01:00
parent 4c06613842
commit f9834e87d4
1 changed files with 5 additions and 5 deletions

View File

@ -158,7 +158,7 @@ out:
static int tlv_get(struct btrfs_send_stream *sctx, int attr, void **data, int *len) static int tlv_get(struct btrfs_send_stream *sctx, int attr, void **data, int *len)
{ {
int ret; int ret;
struct btrfs_tlv_header *h; struct btrfs_tlv_header *hdr;
if (attr <= 0 || attr > BTRFS_SEND_A_MAX) { if (attr <= 0 || attr > BTRFS_SEND_A_MAX) {
error("invalid attribute requested, attr = %d", attr); error("invalid attribute requested, attr = %d", attr);
@ -166,15 +166,15 @@ static int tlv_get(struct btrfs_send_stream *sctx, int attr, void **data, int *l
goto out; goto out;
} }
h = sctx->cmd_attrs[attr]; hdr = sctx->cmd_attrs[attr];
if (!h) { if (!hdr) {
error("attribute %d requested but not present", attr); error("attribute %d requested but not present", attr);
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
} }
*len = le16_to_cpu(h->tlv_len); *len = le16_to_cpu(hdr->tlv_len);
*data = h + 1; *data = hdr + 1;
ret = 0; ret = 0;