From 2bca57bacc88e4d81fd92c72f1d4eb42c1372ac8 Mon Sep 17 00:00:00 2001
From: Siva Chandra <sivachandra@chromium.org>
Date: Mon, 3 Mar 2014 05:08:47 -0800
Subject: [PATCH] Remove unnecessary argument METHOD to
 valops.c:oload_method_static.

	* valops.c (oload_method_static): Remove unnecessary argument
	METHOD.  Update all callers.
---
 gdb/ChangeLog |  5 +++++
 gdb/valops.c  | 15 +++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cad4602b0c3..21907fabd0a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-18  Siva Chandra Reddy  <sivachandra@google.com>
+
+	* valops.c (oload_method_static): Remove unnecessary argument
+	METHOD.  Update all callers.
+
 2014-04-18  Pedro alves  <palves@redhat.com>
 	    Tom Tromey  <tromey@redhat.com>
 
diff --git a/gdb/valops.c b/gdb/valops.c
index 7f2d5f05f01..ff25f1a67d9 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -73,7 +73,7 @@ static int find_oload_champ (struct value **, int, int,
 			     struct fn_field *, struct symbol **,
 			     struct badness_vector **);
 
-static int oload_method_static (int, struct fn_field *, int);
+static int oload_method_static_p (struct fn_field *, int);
 
 enum oload_classification { STANDARD, NON_STANDARD, INCOMPATIBLE };
 
@@ -2488,8 +2488,8 @@ find_overload_match (struct value **args, int nargs,
 
 	  method_match_quality =
 	      classify_oload_match (method_badness, nargs,
-	                            oload_method_static (method, fns_ptr,
-	                                                 method_oload_champ));
+	                            oload_method_static_p (fns_ptr,
+							   method_oload_champ));
 
 	  make_cleanup (xfree, method_badness);
 	}
@@ -2637,7 +2637,7 @@ find_overload_match (struct value **args, int nargs,
     }
 
   if (staticp != NULL)
-    *staticp = oload_method_static (method, fns_ptr, method_oload_champ);
+    *staticp = oload_method_static_p (fns_ptr, method_oload_champ);
 
   if (method_oload_champ >= 0)
     {
@@ -2876,7 +2876,7 @@ find_oload_champ (struct value **args, int nargs,
       if (fns_ptr != NULL)
 	{
 	  nparms = TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (fns_ptr, ix));
-	  static_offset = oload_method_static (1, fns_ptr, ix);
+	  static_offset = oload_method_static_p (fns_ptr, ix);
 	}
       else
 	{
@@ -2954,10 +2954,9 @@ find_oload_champ (struct value **args, int nargs,
    a non-static method or a function that isn't a method.  */
 
 static int
-oload_method_static (int method, struct fn_field *fns_ptr, int index)
+oload_method_static_p (struct fn_field *fns_ptr, int index)
 {
-  if (method && fns_ptr && index >= 0
-      && TYPE_FN_FIELD_STATIC_P (fns_ptr, index))
+  if (fns_ptr && index >= 0 && TYPE_FN_FIELD_STATIC_P (fns_ptr, index))
     return 1;
   else
     return 0;
-- 
GitLab