mirror of
https://github.com/dgibson/dtc.git
synced 2026-10-10 08:03:00 -04:00
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>
This commit is contained in:
parent
2d45d1c5c6
commit
3b62fdaebf
10 changed files with 41 additions and 43 deletions
6
fdtput.c
6
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue