![]() At present, libfdt functions returning a structure offset return a zero-or-positive offset on success, and return a negative error code on failure. Functions which only return an error code return a positive version of the error code, or 0 on success. This patch improves consistency by always returning negative error codes on failure, for both types of function. With this change, we do away with the special fdt_offset_error() macro for checking whether a returned offset value is an error and extracting the encoded error value within. Instead an explicit (ret_value < 0) is now the preferred way of checking return values for both offset-returning and error-code-returning functions. The fdt_strerror() function in the test code is updated correspondingly to make more sense with the new conventions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> |
||
---|---|---|
tests | ||
.gitignore | ||
GPL | ||
Makefile | ||
fdt.c | ||
fdt.h | ||
fdt_ro.c | ||
fdt_rw.c | ||
fdt_sw.c | ||
fdt_wip.c | ||
libfdt.h | ||
libfdt_env.h | ||
libfdt_internal.h |