summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/anytun.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index f01ef4f..ddfacfd 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -332,14 +332,11 @@ typedef boost::detail::thread::lock_ops<boost::mutex> mutex_ops;
static int boost_mutex_init(void **priv)
{
- int err = 0;
boost::mutex *lock = new boost::mutex();
-
if (!lock)
- err = ENOMEM;
- if (!err)
- *priv = lock;
- return err;
+ return ENOMEM;
+ *priv = lock;
+ return 0;
}
static int boost_mutex_destroy(void **lock)