[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/11] acpi_table_add(): rename 'qemu_len' to 'newle
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 06/11] acpi_table_add(): rename 'qemu_len' to 'newlen' |
Date: |
Wed, 27 Jun 2012 17:23:02 -0300 |
Now there's only one "length of the new table" variable inside acpi_table_add()
(acpi_len is now inside acpi_make_table_header()), so name it "newlen" instead
of "qemu_len".
This change looks pointless by itself, but it should make the code
clearer after changing the rest of the code handling
acpi_tables/acpi_tables_len.
(Yes, I could have introduced 'qemu_len' as 'newlen' directly, but I
like to keep the code during intermediate refactoring steps clear as
well, and 'newlen' would be a confusing name when 'qemu_len' was
introduced).
No behavior change, just a variable rename.
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/acpi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/acpi.c b/hw/acpi.c
index 16e2065..e69b37a 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -190,7 +190,7 @@ int acpi_table_add(const char *t)
{
char buf[1024], *f;
size_t start, allen;
- size_t qemu_len;
+ size_t newlen; /* length of the new table */
bool has_header;
int r;
@@ -254,9 +254,9 @@ int acpi_table_add(const char *t)
f = acpi_tables + start; /* start of the table */
/* length of the whole table, including our prefix */
- qemu_len = allen - start;
+ newlen = allen - start;
- if (acpi_make_table_header(t, has_header, f, qemu_len) < 0) {
+ if (acpi_make_table_header(t, has_header, f, newlen) < 0) {
return -1;
}
--
1.7.10.4
- [Qemu-devel] [PATCH 00/11] acpi_table_add() code cleanup, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 03/11] acpi_table_add(): rename 'len' to 'acpi_len', Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 04/11] acpi_table_add(): introduce 'qemu_len' variable, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 09/11] acpi_table_add(): extract acpi_tables reallocation code to a separate function, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 05/11] acpi_table_add(): extract ACPI header creation to separate function, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 10/11] acpi_table_add(): use acpi_newtable_resize() return value, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 01/11] acpi_table_add(): simplify acpi_tables on-demand initialization, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 06/11] acpi_table_add(): rename 'qemu_len' to 'newlen',
Eduardo Habkost <=
- [Qemu-devel] [PATCH 02/11] acpi_table_add(): extract acpi_tables init to separate function, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 07/11] acpi_table_add(): eliminate 'allen' variable, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 08/11] acpi_table_add(): eliminate 'start' variable, Eduardo Habkost, 2012/06/27
- [Qemu-devel] [PATCH 11/11] acpi_table_add(): extract acpi_tables count update code to separate function, Eduardo Habkost, 2012/06/27