diff options
author | andrew <andrew@FreeBSD.org> | 2014-10-31 18:20:39 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2014-10-31 18:20:39 +0000 |
commit | bcbf85db1cddc7b9628c85a6606c58b8867af24f (patch) | |
tree | 47a8ebae7bb53d7f781810f336c8f5a82e260a44 /sys/boot/fdt/fdt_loader_cmd.c | |
parent | 888be1193fbf75c51f6c98e68a88d0e6fad81e79 (diff) | |
download | FreeBSD-src-bcbf85db1cddc7b9628c85a6606c58b8867af24f.zip FreeBSD-src-bcbf85db1cddc7b9628c85a6606c58b8867af24f.tar.gz |
Clean up the types of a few strings to make them const when they are never
written to.
Diffstat (limited to 'sys/boot/fdt/fdt_loader_cmd.c')
-rw-r--r-- | sys/boot/fdt/fdt_loader_cmd.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/boot/fdt/fdt_loader_cmd.c b/sys/boot/fdt/fdt_loader_cmd.c index b753ce2..23ad6de 100644 --- a/sys/boot/fdt/fdt_loader_cmd.c +++ b/sys/boot/fdt/fdt_loader_cmd.c @@ -364,11 +364,11 @@ fdt_setup_fdtp() (cellbuf), (lim), (cellsize), 16); static int -_fdt_strtovect(char *str, void *cellbuf, int lim, unsigned char cellsize, +_fdt_strtovect(const char *str, void *cellbuf, int lim, unsigned char cellsize, uint8_t base) { - char *buf = str; - char *end = str + strlen(str) - 2; + const char *buf = str; + const char *end = str + strlen(str) - 2; uint32_t *u32buf = NULL; uint8_t *u8buf = NULL; int cnt = 0; @@ -411,7 +411,8 @@ _fdt_strtovect(char *str, void *cellbuf, int lim, unsigned char cellsize, static void fixup_ethernet(const char *env, char *ethstr, int *eth_no, int len) { - char *end, *str; + const char *str; + char *end; uint8_t tmp_addr[6]; int i, n; @@ -1347,7 +1348,7 @@ static int fdt_modprop(int nodeoff, char *propname, void *value, char mode) { uint32_t cells[100]; - char *buf; + const char *buf; int len, rv; const struct fdt_property *p; @@ -1365,7 +1366,7 @@ fdt_modprop(int nodeoff, char *propname, void *value, char mode) } len = strlen(value); rv = 0; - buf = (char *)value; + buf = value; switch (*buf) { case '&': |