Permalink
Browse files

fixed possible bug in sync messaging

this patch fixes a possible bug caused by uninitialized variables
  • Loading branch information...
1 parent 9c1b9ca commit 24238b60132216a6007a79191b9cfc9cef2e372b @Neverlord Neverlord committed Feb 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/abstract_scheduled_actor.cpp
@@ -62,7 +62,7 @@ bool abstract_scheduled_actor::chained_enqueue(actor* sender, any_tuple msg) {
}
bool abstract_scheduled_actor::chained_sync_enqueue(actor* sender, message_id_t id, any_tuple msg) {
- bool failed;
+ bool failed = false;
bool result = enqueue_node(super::fetch_node(sender, std::move(msg), id), pending, &failed);
if (failed) {
sync_request_bouncer f{this, exit_reason()};
@@ -81,7 +81,7 @@ void abstract_scheduled_actor::enqueue(actor* sender, any_tuple msg) {
}
void abstract_scheduled_actor::sync_enqueue(actor* sender, message_id_t id, any_tuple msg) {
- bool failed;
+ bool failed = false;
enqueue_node(super::fetch_node(sender, std::move(msg), id), ready, &failed);
if (failed) {
sync_request_bouncer f{this, exit_reason()};

0 comments on commit 24238b6

Please sign in to comment.