From 3b62fdaebfe577566ff2387eb1c55344a7f55982 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 18 Oct 2017 16:59:43 +1100 Subject: 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 --- fdtput.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fdtput.c') 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, -- cgit v1.1