[Crosstoolchain-logs] [device-tree-compiler] 155/357: libfdt: Make fdt_string() return a const pointer
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:06:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.
commit 11d530202172f1705c9e1e01e6de1642df94479d
Author: David Gibson <david at gibson.dropbear.id.au>
Date: Thu Oct 18 12:10:42 2007 +1000
libfdt: Make fdt_string() return a const pointer
Currently, fdt_string() returns a (non-const) char *, despite taking a
const void *fdt. This is inconsistent with all the other read-only
functions which all return const pointers into the blob.
This patch fixes that.
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
libfdt/fdt_ro.c | 2 +-
libfdt/libfdt.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c
index 49f2653..ebd3d01 100644
--- a/libfdt/fdt_ro.c
+++ b/libfdt/fdt_ro.c
@@ -82,7 +82,7 @@ static int nodename_eq(const void *fdt, int offset,
return 0;
}
-char *fdt_string(const void *fdt, int stroffset)
+const char *fdt_string(const void *fdt, int stroffset)
{
return (char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
}
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index 9bb0fe3..8d15155 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -110,7 +110,7 @@ static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
int fdt_move(const void *fdt, void *buf, int bufsize);
/* Read-only functions */
-char *fdt_string(const void *fdt, int stroffset);
+const char *fdt_string(const void *fdt, int stroffset);
int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
int fdt_num_mem_rsv(const void *fdt);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list