diff options
Diffstat (limited to 'source3/lib/socket_wrapper/socket_wrapper.c')
-rw-r--r-- | source3/lib/socket_wrapper/socket_wrapper.c | 9 |
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; } } |