summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/drain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/messaging/drain.cpp')
-rw-r--r--cpp/examples/messaging/drain.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpp/examples/messaging/drain.cpp b/cpp/examples/messaging/drain.cpp
index 4901fb303f..5c938e9742 100644
--- a/cpp/examples/messaging/drain.cpp
+++ b/cpp/examples/messaging/drain.cpp
@@ -102,7 +102,7 @@ int main(int argc, char** argv)
}
std::cout << "')" << std::endl;
session.acknowledge();
- if (count && ++i == count)
+ if (count && (++i == count))
break;
}
receiver.close();
@@ -116,5 +116,3 @@ int main(int argc, char** argv)
}
return 1;
}
-
-