diff options
author | Andrew Jones <drjones@redhat.com> | 2015-11-20 12:31:53 -0500 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-11-24 16:01:41 +0900 |
commit | 68262155d8c661586b809bc5301a7dff1c378137 (patch) | |
tree | 314deb9756b23a884a769f2a01d7549d37ae6ea0 | |
parent | 65a15228b570ee5821e2dec0ad610f32d2b20714 (diff) |
kexec/fs2dt: cleanup pathname
putnode() will add the trailing '/', avoid having two. Also
pathstart is unused, get rid of it.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/fs2dt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c index 9392e85..affee57 100644 --- a/kexec/fs2dt.c +++ b/kexec/fs2dt.c @@ -39,7 +39,7 @@ #define MEMRESERVE 256 /* max number of reserved memory blocks */ #define MEM_RANGE_CHUNK_SZ 2048 /* Initial num dwords for mem ranges */ -static char pathname[MAXPATH], *pathstart; +static char pathname[MAXPATH]; static char propnames[NAMESPACE] = { 0 }; static unsigned *dt_base, *dt; static unsigned int dt_cur_size; @@ -800,9 +800,7 @@ static void add_boot_block(char **bufp, off_t *sizep) void create_flatten_tree(char **bufp, off_t *sizep, const char *cmdline) { - strcpy(pathname, "/proc/device-tree/"); - - pathstart = pathname + strlen(pathname); + strcpy(pathname, "/proc/device-tree"); dt_cur_size = INIT_TREE_WORDS; dt_base = malloc(dt_cur_size*4); |