summaryrefslogtreecommitdiffstats
path: root/common/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/env.c')
-rw-r--r--common/env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/env.c b/common/env.c
index e57a520a35..a01a27e24f 100644
--- a/common/env.c
+++ b/common/env.c
@@ -219,7 +219,7 @@ int setenv(const char *_name, const char *value)
else
ret = -ENODEV;
- errno = ret;
+ errno = -ret;
if (ret < 0)
perror("set parameter");