aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2014-10-06 14:18:16 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2014-10-06 14:58:35 +0100
commitbeecd139a26f429946ccef03182094cd5ed03226 (patch)
tree915da95f09a28a8c8a33f72b37a99994e41f6117 /src/rpc/core_rpc_server.cpp
parenttests: add a test for slow_memmem (diff)
downloadmonero-beecd139a26f429946ccef03182094cd5ed03226.tar.xz
core_rpc_server: use do while(0) idiom in macros using if
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 97795801c..036cb64ff 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -111,7 +111,7 @@ namespace cryptonote
}
return true;
}
-#define CHECK_CORE_BUSY() if(!check_core_busy()){res.status = CORE_RPC_STATUS_BUSY;return true;}
+#define CHECK_CORE_BUSY() do { if(!check_core_busy()){res.status = CORE_RPC_STATUS_BUSY;return true;} } while(0)
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::check_core_ready()
{
@@ -121,7 +121,7 @@ namespace cryptonote
}
return check_core_busy();
}
-#define CHECK_CORE_READY() if(!check_core_ready()){res.status = CORE_RPC_STATUS_BUSY;return true;}
+#define CHECK_CORE_READY() do { if(!check_core_ready()){res.status = CORE_RPC_STATUS_BUSY;return true;} } while(0)
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_height(const COMMAND_RPC_GET_HEIGHT::request& req, COMMAND_RPC_GET_HEIGHT::response& res, connection_context& cntx)