You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/01/17 21:24:12 UTC

mesos git commit: Fixed an inconsistency in argument ordering.

Repository: mesos
Updated Branches:
  refs/heads/master 4099daa87 -> be6f40178


Fixed an inconsistency in argument ordering.

In the master's validation of offers, the functions take offer IDs
first, followed by the master pointer. This fixes an inconsistent
function.

Review: https://reviews.apache.org/r/54649/


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

Branch: refs/heads/master
Commit: be6f40178bdb98d96ecee41c84638cfb2dc06125
Parents: 4099daa
Author: Jay Guo <gu...@gmail.com>
Authored: Tue Jan 17 13:22:58 2017 -0800
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Jan 17 13:22:58 2017 -0800

----------------------------------------------------------------------
 src/master/validation.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/be6f4017/src/master/validation.cpp
----------------------------------------------------------------------
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index 96aa365..5fa99bf 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -1327,8 +1327,8 @@ Try<FrameworkID> getFrameworkId(Master* master, const OfferID& offerId)
 
 
 Option<Error> validateOfferIds(
-    Master* master,
-    const RepeatedPtrField<OfferID>& offerIds)
+    const RepeatedPtrField<OfferID>& offerIds,
+    Master* master)
 {
   foreach (const OfferID& offerId, offerIds) {
     Offer* offer = getOffer(master, offerId);
@@ -1342,8 +1342,8 @@ Option<Error> validateOfferIds(
 
 
 Option<Error> validateInverseOfferIds(
-    Master* master,
-    const RepeatedPtrField<OfferID>& offerIds)
+    const RepeatedPtrField<OfferID>& offerIds,
+    Master* master)
 {
   foreach (const OfferID& offerId, offerIds) {
     InverseOffer* inverseOffer = getInverseOffer(master, offerId);
@@ -1451,7 +1451,7 @@ Option<Error> validate(
 
   vector<lambda::function<Option<Error>()>> validators = {
     lambda::bind(validateUniqueOfferID, offerIds),
-    lambda::bind(validateOfferIds, master, offerIds),
+    lambda::bind(validateOfferIds, offerIds, master),
     lambda::bind(validateFramework, offerIds, master, framework),
     lambda::bind(validateSlave, offerIds, master)
   };
@@ -1477,7 +1477,7 @@ Option<Error> validateInverseOffers(
 
   vector<lambda::function<Option<Error>()>> validators = {
     lambda::bind(validateUniqueOfferID, offerIds),
-    lambda::bind(validateInverseOfferIds, master, offerIds),
+    lambda::bind(validateInverseOfferIds, offerIds, master),
     lambda::bind(validateFramework, offerIds, master, framework),
     lambda::bind(validateSlave, offerIds, master)
   };