[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesos-commits
Subject:    svn commit: r1404237 - in /incubator/mesos/trunk/src: examples/balloon_executor.cpp tests/cgroups_te
From:       benh () apache ! org
Date:       2012-10-31 16:39:23
Message-ID: 20121031163923.310BF2388A29 () eris ! apache ! org
[Download RAW message or body]

Author: benh
Date: Wed Oct 31 16:39:22 2012
New Revision: 1404237

URL: http://svn.apache.org/viewvc?rev=1404237&view=rev
Log:
Fixed bug in usage of memset.

Modified:
    incubator/mesos/trunk/src/examples/balloon_executor.cpp
    incubator/mesos/trunk/src/tests/cgroups_tests.cpp

Modified: incubator/mesos/trunk/src/examples/balloon_executor.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/balloon_executor.cpp?rev=1404237&r1=1404236&r2=1404237&view=diff
 ==============================================================================
--- incubator/mesos/trunk/src/examples/balloon_executor.cpp (original)
+++ incubator/mesos/trunk/src/examples/balloon_executor.cpp Wed Oct 31 16:39:22 2012
@@ -63,7 +63,7 @@ static void balloon(size_t limit)
       abort();
     }
 
-    if (memset(buffer, 1, chunk) != 0) {
+    if (memset(buffer, 1, chunk) != buffer) {
       perror("Failed to fill memory, memset");
       abort();
     }

Modified: incubator/mesos/trunk/src/tests/cgroups_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/cgroups_tests.cpp?rev=1404237&r1=1404236&r2=1404237&view=diff
 ==============================================================================
--- incubator/mesos/trunk/src/tests/cgroups_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/cgroups_tests.cpp Wed Oct 31 16:39:22 2012
@@ -508,7 +508,7 @@ TEST_F(CgroupsAnyHierarchyWithCpuMemoryT
       abort();
     }
 
-    if (memset(buffer, 1, limit) != 0) {
+    if (memset(buffer, 1, limit) != buffer) {
       perror("Failed to fill memory, memset");
       abort();
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic