diff options
author | 2017-10-18 17:22:40 +1100 | |
---|---|---|
committer | 2017-10-26 09:25:14 +0200 | |
commit | c8b38f65fdec4226d43f0e8eb5cf541aff3c80a5 (patch) | |
tree | c48ddbd7590c3bb00c369debf44037cfc154278e /libfdt/fdt_wip.c | |
parent | 3b62fdaebfe577566ff2387eb1c55344a7f55982 (diff) |
libfdt: Remove leading underscores from identifiers
In a lot of places libfdt uses a leading _ character to mark an identifier
as "internal" (not part of the published libfdt API). This is a bad idea,
because identifiers with a leading _ are generally reserved by the C
library or system. It's particularly dangerous for libfdt, because it's
designed to be able to be integrated into lots of different environments.
In some cases the leading _ has no purpose, so we simply drop it. In most
cases we move it to the end, as our new convention for marking internal
identifiers.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'libfdt/fdt_wip.c')
-rw-r--r-- | libfdt/fdt_wip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libfdt/fdt_wip.c b/libfdt/fdt_wip.c index 5e85919..534c1cb 100644 --- a/libfdt/fdt_wip.c +++ b/libfdt/fdt_wip.c @@ -93,7 +93,7 @@ int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, val, len); } -static void _fdt_nop_region(void *start, int len) +static void fdt_nop_region_(void *start, int len) { fdt32_t *p; @@ -110,12 +110,12 @@ int fdt_nop_property(void *fdt, int nodeoffset, const char *name) if (!prop) return len; - _fdt_nop_region(prop, len + sizeof(*prop)); + fdt_nop_region_(prop, len + sizeof(*prop)); return 0; } -int _fdt_node_end_offset(void *fdt, int offset) +int fdt_node_end_offset_(void *fdt, int offset) { int depth = 0; @@ -129,11 +129,11 @@ int fdt_nop_node(void *fdt, int nodeoffset) { int endoffset; - endoffset = _fdt_node_end_offset(fdt, nodeoffset); + endoffset = fdt_node_end_offset_(fdt, nodeoffset); if (endoffset < 0) return endoffset; - _fdt_nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), + fdt_nop_region_(fdt_offset_ptr_w(fdt, nodeoffset, 0), endoffset - nodeoffset); return 0; } |