summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/smbwrapper/shared.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/smbwrapper/shared.c b/source/smbwrapper/shared.c
index 52ed9baac80..58a37254e88 100644
--- a/source/smbwrapper/shared.c
+++ b/source/smbwrapper/shared.c
@@ -187,13 +187,14 @@ int smbw_setenv(const char *name, const char *value)
{
pstring s;
char *p;
+ int ret = -1;
slprintf(s,sizeof(s)-1,"%s=%s", name, value);
p = strdup(s);
- if (p) p = putenv(p);
+ if (p) ret = putenv(p);
- return p;
+ return ret;
}