summaryrefslogtreecommitdiff
path: root/source4/lib/socket_wrapper/socket_wrapper.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-03-06 23:03:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:19 -0500
commiteffbda4fd8c648dd9900e5451e04bc8438ac7c73 (patch)
treea543cec99bcb6c660dfb9409fa28a5ea1f812b89 /source4/lib/socket_wrapper/socket_wrapper.c
parent904c03abc46bf37d61d1642e7a17de7d4efcdcaf (diff)
downloadsamba-effbda4fd8c648dd9900e5451e04bc8438ac7c73.tar.gz
samba-effbda4fd8c648dd9900e5451e04bc8438ac7c73.tar.bz2
samba-effbda4fd8c648dd9900e5451e04bc8438ac7c73.zip
r21729: Some more tests
(This used to be commit d2baa8218cf504d6631d610f9fd393ad8c61574c)
Diffstat (limited to 'source4/lib/socket_wrapper/socket_wrapper.c')
-rw-r--r--source4/lib/socket_wrapper/socket_wrapper.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/socket_wrapper/socket_wrapper.c b/source4/lib/socket_wrapper/socket_wrapper.c
index 8eff6a49ac..3e3d384f85 100644
--- a/source4/lib/socket_wrapper/socket_wrapper.c
+++ b/source4/lib/socket_wrapper/socket_wrapper.c
@@ -199,15 +199,14 @@ const char *socket_wrapper_dir(void)
return s;
}
-static unsigned int socket_wrapper_default_iface(void)
+unsigned int socket_wrapper_default_iface(void)
{
const char *s = getenv("SOCKET_WRAPPER_DEFAULT_IFACE");
if (s) {
unsigned int iface;
- if (sscanf(s, "%u", &iface) == 1) {
- if (iface >= 1 && iface <= MAX_WRAPPED_INTERFACES) {
- return iface;
- }
+ iface = atoi(s);
+ if (iface >= 1 && iface <= MAX_WRAPPED_INTERFACES) {
+ return iface;
}
}