From 46e7bfbac6fa7d674e0536e012a2cb6af16abd34 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 29 Mar 2018 13:50:57 +0200 Subject: loadenv: Do not depend on normalise_path() normalise_path() will go away, so do without it. Signed-off-by: Sascha Hauer --- 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) { -- cgit v1.2.3