normalise_path() will go away, so do without it.

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 commands/loadenv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/commands/loadenv.c b/commands/loadenv.c
index 44e96c3b60..6469affadb 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -62,20 +62,16 @@ static int do_loadenv(int argc, char *argv[])
        if (argc - optind < 1) {
                filename = default_environment_path_get();
        } else {
-               char *str = normalise_path(argv[optind]);
-
                /*
                 * /dev/defaultenv use to contain the defaultenvironment.
                 * we do not have this file anymore, but maintain compatibility
                 * to the 'loadenv -s /dev/defaultenv' command to restore the
                 * default environment for some time.
                 */
-               if (!strcmp(str, "/dev/defaultenv"))
+               if (!strcmp(argv[optind], "/dev/defaultenv"))
                        defaultenv = 1;
                else
                        filename = argv[optind];
-
-               free(str);
        }
 
        if (scrub) {
-- 
2.16.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to