summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-12-19 02:42:14 +0000
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-12-19 02:42:14 +0000
commita41d6d2573347748298ebeded5938fd23a9e7ffa (patch)
tree59883e1fd6f72f1e364e6ad53cde46db90570b2a
parent295cee3d5532fe4c4229af251e32cbbb0e34599e (diff)
downloadfreebsd-a41d6d2573347748298ebeded5938fd23a9e7ffa.tar.gz
freebsd-a41d6d2573347748298ebeded5938fd23a9e7ffa.tar.bz2
Revert r368776:
login(1): when exporting variables check the result of setenv(3) mismatch: the return value upon error is -1, so the code was not doing nothing. git-svn-id: http://svn.freebsd.org/base/head@368777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
-rw-r--r--usr.bin/login/login.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index 380e813f4b0..e99ee5efc2e 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -793,7 +793,6 @@ export(const char *s)
char *p;
const char **pp;
size_t n;
- int rv;
if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL)
return (0);
@@ -805,10 +804,8 @@ export(const char *s)
return (0);
}
*p = '\0';
- rv = setenv(s, p + 1, 1);
+ (void)setenv(s, p + 1, 1);
*p = '=';
- if (rv == 1)
- return (0);
return (1);
}