diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2015-07-28 12:11:12 -0400 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2015-09-01 04:55:15 -0700 |
commit | 0773ca67fdb60a142207759fa6c07a69882ce59c (patch) | |
tree | 027101fce644fe17e58c78321b1632f38aaed166 /xlators/mgmt/glusterd | |
parent | 038dfe57cf0c5944b0392332dbf5a00bb1208150 (diff) |
all: reduce "inline" usage
There are three kinds of inline functions: plain inline, extern inline,
and static inline. All three have been removed from .c files, except
those in "contrib" which aren't our problem. Inlines in .h files, which
are overwhelmingly "static inline" already, have generally been left
alone. Over time we should be able to "lower" these into .c files, but
that has to be done in a case-by-case fashion requiring more manual
effort. This part was easy to do automatically without (as far as I can
tell) any ill effect.
In the process, several pieces of dead code were flagged by the
compiler, and were removed.
Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155
BUG: 1245331
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/11769
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-hooks.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-server-quorum.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c index 48a9bc4f79b..4db5460c798 100644 --- a/xlators/mgmt/glusterd/src/glusterd-hooks.c +++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c @@ -59,7 +59,7 @@ char glusterd_hook_dirnames[GD_OP_MAX][256] = }; #undef EMPTY -static inline gf_boolean_t +static gf_boolean_t glusterd_is_hook_enabled (char *script) { return (script[0] == 'S' && (fnmatch ("*.rpmsave", script, 0) != 0) diff --git a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c index 61623f4167a..9f60362b522 100644 --- a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c +++ b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c @@ -176,7 +176,7 @@ out: return reconfigured; } -static inline gf_boolean_t +static gf_boolean_t _is_contributing_to_quorum (gd_quorum_contrib_t contrib) { if ((contrib == QUORUM_UP) || (contrib == QUORUM_DOWN)) @@ -184,7 +184,7 @@ _is_contributing_to_quorum (gd_quorum_contrib_t contrib) return _gf_false; } -static inline gf_boolean_t +static gf_boolean_t _does_quorum_meet (int active_count, int quorum_count) { return (active_count >= quorum_count); diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 2aef46287cf..e9a98ea694d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -8991,7 +8991,7 @@ glusterd_handle_snapshot (rpcsvc_request_t *req) return glusterd_big_locked_handler (req, glusterd_handle_snapshot_fn); } -static inline void +static void glusterd_free_snap_op (glusterd_snap_op_t *snap_op) { if (snap_op) { @@ -9002,7 +9002,7 @@ glusterd_free_snap_op (glusterd_snap_op_t *snap_op) } } -static inline void +static void glusterd_free_missed_snapinfo (glusterd_missed_snap_info *missed_snapinfo) { glusterd_snap_op_t *snap_opinfo = NULL; diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 1eb789e5983..37d7d142118 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -2875,7 +2875,7 @@ out: return volinfo; } -static inline void +static void glusterd_store_set_options_path (glusterd_conf_t *conf, char *path, size_t len) { snprintf (path, len, "%s/options", conf->workdir); diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 26a7fface29..3491cb10187 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4715,7 +4715,7 @@ glusterd_calc_dist_leaf_count (int rcount, int scount) return (rcount ? rcount : 1) * (scount ? scount : 1); } -inline int +int glusterd_get_dist_leaf_count (glusterd_volinfo_t *volinfo) { int rcount = volinfo->replica_count; @@ -5567,7 +5567,7 @@ out: return ret; } -inline int +int glusterd_rb_check_bricks (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *src, glusterd_brickinfo_t *dst) { diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 59bc0638608..38cc609eab7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -243,7 +243,7 @@ xlator_get_option (xlator_t *xl, char *key, char **value) return dict_get_str (xl->options, key, value); } -static inline xlator_t * +static xlator_t * first_of (volgen_graph_t *graph) { return (xlator_t *)graph->graph.first; diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 95f346cbb02..ab507d462b3 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -364,7 +364,7 @@ out: } -static inline int32_t +static int32_t glusterd_program_register (xlator_t *this, rpcsvc_t *svc, rpcsvc_program_t *prog) { |