You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2016/10/20 12:26:34 UTC

[06/10] qpid-proton git commit: PROTON-1320: c++ Add std:: namespace prefix to srand and rand

PROTON-1320: c++ Add std:: namespace prefix to srand and rand

Signed-off-by: aboutros <ad...@murex.com>


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/cca892e6
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/cca892e6
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/cca892e6

Branch: refs/heads/master
Commit: cca892e6c7b88d0cd65aa3c1074fd4570f28d881
Parents: 8c3aa3a
Author: aboutros <ad...@murex.com>
Authored: Fri Oct 7 14:43:45 2016 +0200
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Oct 20 08:13:52 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/container_test.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cca892e6/proton-c/bindings/cpp/src/container_test.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container_test.cpp b/proton-c/bindings/cpp/src/container_test.cpp
index 1a3e2c4..062bb94 100644
--- a/proton-c/bindings/cpp/src/container_test.cpp
+++ b/proton-c/bindings/cpp/src/container_test.cpp
@@ -43,9 +43,9 @@ static std::string int2string(int n) {
 int listen_on_random_port(proton::container& c, proton::listener& l) {
     int port;
     // I'm going to hell for this:
-    srand((unsigned int)time(0));
+    std::srand((unsigned int)time(0));
     while (true) {
-        port = 20000 + (rand() % 30000);
+        port = 20000 + (std::rand() % 30000);
         try {
             l = c.listen("0.0.0.0:" + int2string(port));
             break;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org