mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Consolidate utilfdt_read_len() variants
There are no less than _four_ variants on utilfdt_read() which is a bit excessive. The _len() variants are particularly pointless, since we can achieve the same thing with very little extra verbosity by using the usual convention of ignoring return parameters if they're NULL. So, get rid of them (we keep the shorter names without _len, but add now-optional len parameters). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
parent
d5db5382c5
commit
6473a21d8b
7 changed files with 15 additions and 38 deletions
|
@ -204,7 +204,7 @@ int main(int argc, char *argv[])
|
|||
usage("missing input filename");
|
||||
file = argv[optind];
|
||||
|
||||
buf = utilfdt_read_len(file, &len);
|
||||
buf = utilfdt_read(file, &len);
|
||||
if (!buf)
|
||||
die("could not read: %s\n", file);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue