[PATCH 2/2] export: do not fail on already exported variable

Sascha Hauer s.hauer at pengutronix.de
Fri Nov 11 10:21:45 EST 2011


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/env.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/common/env.c b/common/env.c
index defb26b..05ed714 100644
--- a/common/env.c
+++ b/common/env.c
@@ -247,8 +247,7 @@ int export(const char *varname)
 	if (val) {
 		setenv_raw(context->global, varname, val);
 		setenv_raw(context->local, varname, NULL);
-		return 0;
 	}
-	return -1;
+	return 0;
 }
 EXPORT_SYMBOL(export);
-- 
1.7.7.1




More information about the barebox mailing list