summaryrefslogtreecommitdiff
path: root/source3/lib/socket_wrapper/socket_wrapper.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-03-06 23:03:34 +0000
committerStefan Metzmacher <metze@samba.org>2008-06-10 11:36:38 +0200
commit235915063957dc9ff31a8e6777e0f63b7f3bf07c (patch)
tree4a3948dd76a481a90789cb740c4f7a77bb1af6bd /source3/lib/socket_wrapper/socket_wrapper.c
parentbd793fb235cd18da8e9d779c767cac81fa3f758e (diff)
downloadsamba-235915063957dc9ff31a8e6777e0f63b7f3bf07c.tar.gz
samba-235915063957dc9ff31a8e6777e0f63b7f3bf07c.tar.bz2
samba-235915063957dc9ff31a8e6777e0f63b7f3bf07c.zip
r21729: Some more tests
(cherry picked from commit d2baa8218cf504d6631d610f9fd393ad8c61574c) (This used to be commit cf6d815ba82a25c1e1f1dfdb8548cc588d44d1aa)
Diffstat (limited to 'source3/lib/socket_wrapper/socket_wrapper.c')
-rw-r--r--source3/lib/socket_wrapper/socket_wrapper.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/lib/socket_wrapper/socket_wrapper.c b/source3/lib/socket_wrapper/socket_wrapper.c
index ad5c3c177c..b6b88fbcd1 100644
--- a/source3/lib/socket_wrapper/socket_wrapper.c
+++ b/source3/lib/socket_wrapper/socket_wrapper.c
@@ -200,15 +200,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;
}
}