aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/util/port.h
diff options
context:
space:
mode:
authorGravatar David Klempner <klempner@google.com>2016-05-13 15:21:57 -0700
committerGravatar David Klempner <klempner@google.com>2016-05-13 15:21:57 -0700
commitc7614cf2779c4909d8ec3f64923242cfd02f157a (patch)
treed241faf78a984d88843346a1a9c94e3a4365bbc7 /test/core/util/port.h
parent2ecb08f5a76f97443deae01befdfee679a5c9b6d (diff)
Fix declarations in port.h to not be ambiguous in C due to K&R.
Also actually add the port parameter to grpc_recycle_unused_port. Also remove the downsizing gpr_realloc in the recycle codepath, which is unnecessary and can free the pointer.
Diffstat (limited to 'test/core/util/port.h')
-rw-r--r--test/core/util/port.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/core/util/port.h b/test/core/util/port.h
index 4b70fdc978..faeabbae9b 100644
--- a/test/core/util/port.h
+++ b/test/core/util/port.h
@@ -40,16 +40,16 @@ extern "C" {
/* pick a port number that is currently unused by either tcp or udp. return
0 on failure. */
-int grpc_pick_unused_port();
+int grpc_pick_unused_port(void);
/* pick a port number that is currently unused by either tcp or udp. abort
on failure. */
-int grpc_pick_unused_port_or_die();
+int grpc_pick_unused_port_or_die(void);
/* Return a port which was previously returned by grpc_pick_unused_port().
* Implementations of grpc_pick_unused_port() backed by a portserver may limit
* the total number of ports available; this lets a binary return its allocated
* ports back to the server if it is going to allocate a large number. */
-void grpc_recycle_unused_port();
+void grpc_recycle_unused_port(int port);
#ifdef __cplusplus
}