diff options
author | Christian Pointner <equinox@anytun.org> | 2008-10-20 00:56:16 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-10-20 00:56:16 +0000 |
commit | e353f70b5244065486b24dc2562599632d9a1560 (patch) | |
tree | a216c4a2cac28df29cfdd08b85737998787847e0 /src | |
parent | the signal controller uses boost thread now, (diff) |
small cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/anytun.cpp | 9 |
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) |