summaryrefslogtreecommitdiff
path: root/fdtput.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-10-18 16:59:43 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-10-26 09:25:14 +0200
commit3b62fdaebfe577566ff2387eb1c55344a7f55982 (patch)
tree8b7ff2c661b7b8de1735072afa1ff8deaccedc46 /fdtput.c
parent2d45d1c5c65e9b3cd020fac624ed9bf6c2855a91 (diff)
downloaddevice-tree-compiler-3b62fdaebfe577566ff2387eb1c55344a7f55982.tar.gz
Remove leading underscores from identifiers
In a number of places, dtc and associated tools and test code use leading _ characters on identifiers to flag them as "internal", an idiom taken from the Linux kernel. This is a bad idea in a userspace program, because identifiers with a leading _ are reserved for the C library / system. In some cases, the extra _ served no real purpose, so simply drop it. In others move to the end of the identifier, which is a convention we're free to use for our own purposes. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'fdtput.c')
-rw-r--r--fdtput.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fdtput.c b/fdtput.c
index 8d8e934..72a0058 100644
--- a/fdtput.c
+++ b/fdtput.c
@@ -130,7 +130,7 @@ static int encode_value(struct display_info *disp, char **arg, int arg_count,
#define ALIGN(x) (((x) + (FDT_TAGSIZE) - 1) & ~((FDT_TAGSIZE) - 1))
-static char *_realloc_fdt(char *fdt, int delta)
+static char *realloc_fdt(char *fdt, int delta)
{
int new_sz = fdt_totalsize(fdt) + delta;
fdt = xrealloc(fdt, new_sz);
@@ -144,7 +144,7 @@ static char *realloc_node(char *fdt, const char *name)
/* FDT_BEGIN_NODE, node name in off_struct and FDT_END_NODE */
delta = sizeof(struct fdt_node_header) + ALIGN(strlen(name) + 1)
+ FDT_TAGSIZE;
- return _realloc_fdt(fdt, delta);
+ return realloc_fdt(fdt, delta);
}
static char *realloc_property(char *fdt, int nodeoffset,
@@ -161,7 +161,7 @@ static char *realloc_property(char *fdt, int nodeoffset,
/* actual value in off_struct */
delta += ALIGN(newlen) - ALIGN(oldlen);
- return _realloc_fdt(fdt, delta);
+ return realloc_fdt(fdt, delta);
}
static int store_key_value(char **blob, const char *node_name,