summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-10-20 00:56:16 +0000
committerChristian Pointner <equinox@anytun.org>2008-10-20 00:56:16 +0000
commite353f70b5244065486b24dc2562599632d9a1560 (patch)
treea216c4a2cac28df29cfdd08b85737998787847e0 /src
parentthe signal controller uses boost thread now, (diff)
small cleanup
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)