From: Ben Pfaff Date: Fri, 4 Jun 2010 00:15:53 +0000 (-0700) Subject: rconn: Make rconn_connect() a 'void' function. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4cbfb1952d586282999a287b4e2768c4297dde5;p=openvswitch rconn: Make rconn_connect() a 'void' function. The return value from rconn_connect() is essentially meaningless. None of the current callers uses it. Get rid of it. --- diff --git a/lib/rconn.c b/lib/rconn.c index 7d9592a9..62159c38 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -136,7 +136,7 @@ static bool timed_out(const struct rconn *); static void state_transition(struct rconn *, enum state); static void set_vconn_name(struct rconn *, const char *name); static int try_send(struct rconn *); -static int reconnect(struct rconn *); +static void reconnect(struct rconn *); static void report_error(struct rconn *, int error); static void disconnect(struct rconn *, int error); static void flush_queue(struct rconn *); @@ -232,13 +232,13 @@ rconn_get_probe_interval(const struct rconn *rc) return rc->probe_interval; } -int +void rconn_connect(struct rconn *rc, const char *name) { rconn_disconnect(rc); set_vconn_name(rc, name); rc->reliable = true; - return reconnect(rc); + reconnect(rc); } void @@ -311,7 +311,7 @@ run_VOID(struct rconn *rc OVS_UNUSED) /* Nothing to do. */ } -static int +static void reconnect(struct rconn *rc) { int retval; @@ -330,7 +330,6 @@ reconnect(struct rconn *rc) rc->backoff_deadline = TIME_MAX; /* Prevent resetting backoff. */ disconnect(rc, retval); } - return retval; } static unsigned int diff --git a/lib/rconn.h b/lib/rconn.h index 82228526..d1ae5db5 100644 --- a/lib/rconn.h +++ b/lib/rconn.h @@ -44,7 +44,7 @@ int rconn_get_max_backoff(const struct rconn *); void rconn_set_probe_interval(struct rconn *, int inactivity_probe_interval); int rconn_get_probe_interval(const struct rconn *); -int rconn_connect(struct rconn *, const char *name); +void rconn_connect(struct rconn *, const char *name); void rconn_connect_unreliably(struct rconn *, struct vconn *vconn); void rconn_reconnect(struct rconn *); void rconn_disconnect(struct rconn *);