aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-05-01 10:37:24 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-05-01 10:37:24 +0400
commit9442776ce7068f445fcd8323d19f26d77ee2d9b8 (patch)
tree27c7e7b06ed9f9ee5eb13a7e6257a6225caf6060
parent8003b6eb67a53a37420c7d9c95ac3076fc378e41 (diff)
downloadnode-augeas-9442776ce7068f445fcd8323d19f26d77ee2d9b8.tar.gz
Code cleanup
-rw-r--r--libaugeas.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/libaugeas.cc b/libaugeas.cc
index dfbace1..9722e59 100644
--- a/libaugeas.cc
+++ b/libaugeas.cc
@@ -361,12 +361,10 @@ Handle<Value> LibAugeas::set(const Arguments& args)
* if more than one node matches path.
*/
int rc = aug_set(obj->m_aug, path, value);
- if (0 == rc) {
- return scope.Close(Undefined());
- } else {
+ if (0 != rc) {
throw_aug_error_msg(obj->m_aug);
- return scope.Close(Undefined());
}
+ return scope.Close(Undefined());
}
/*
@@ -455,12 +453,10 @@ Handle<Value> LibAugeas::mv(const Arguments& args)
* if more than one node matches path.
*/
int rc = aug_mv(obj->m_aug, source, dest);
- if (0 == rc) {
- return scope.Close(Undefined());
- } else {
+ if (0 != rc) {
throw_aug_error_msg(obj->m_aug);
- return scope.Close(Undefined());
}
+ return scope.Close(Undefined());
}
/*