aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr/socket_utils_test.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-06 14:39:17 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-06 14:43:31 -0800
commit40422d5fa621624868280094efb2f01c2cd1352b (patch)
treecbb2baa955e11c03fa004e9e0f4f3037ba3d6150 /test/core/iomgr/socket_utils_test.cc
parentaae4ca01a315a69fcf182d09aea1efdfcda13d48 (diff)
parente759d2ad7abdb0702970eeccc5f033ff4b2a4c7f (diff)
Merge master
Diffstat (limited to 'test/core/iomgr/socket_utils_test.cc')
-rw-r--r--test/core/iomgr/socket_utils_test.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/core/iomgr/socket_utils_test.cc b/test/core/iomgr/socket_utils_test.cc
index 30f0c943dc..49c6f799e7 100644
--- a/test/core/iomgr/socket_utils_test.cc
+++ b/test/core/iomgr/socket_utils_test.cc
@@ -39,10 +39,10 @@ struct test_socket_mutator {
int option_value;
};
-static bool mutate_fd(int fd, grpc_socket_mutator *mutator) {
+static bool mutate_fd(int fd, grpc_socket_mutator* mutator) {
int newval;
socklen_t intlen = sizeof(newval);
- struct test_socket_mutator *m = (struct test_socket_mutator *)mutator;
+ struct test_socket_mutator* m = (struct test_socket_mutator*)mutator;
if (0 != setsockopt(fd, IPPROTO_IP, IP_TOS, &m->option_value,
sizeof(m->option_value))) {
@@ -57,24 +57,24 @@ static bool mutate_fd(int fd, grpc_socket_mutator *mutator) {
return true;
}
-static void destroy_test_mutator(grpc_socket_mutator *mutator) {
- struct test_socket_mutator *m = (struct test_socket_mutator *)mutator;
+static void destroy_test_mutator(grpc_socket_mutator* mutator) {
+ struct test_socket_mutator* m = (struct test_socket_mutator*)mutator;
gpr_free(m);
}
-static int compare_test_mutator(grpc_socket_mutator *a,
- grpc_socket_mutator *b) {
- struct test_socket_mutator *ma = (struct test_socket_mutator *)a;
- struct test_socket_mutator *mb = (struct test_socket_mutator *)b;
+static int compare_test_mutator(grpc_socket_mutator* a,
+ grpc_socket_mutator* b) {
+ struct test_socket_mutator* ma = (struct test_socket_mutator*)a;
+ struct test_socket_mutator* mb = (struct test_socket_mutator*)b;
return GPR_ICMP(ma->option_value, mb->option_value);
}
static const grpc_socket_mutator_vtable mutator_vtable = {
mutate_fd, compare_test_mutator, destroy_test_mutator};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
int sock;
- grpc_error *err;
+ grpc_error* err;
grpc_test_init(argc, argv);
sock = socket(PF_INET, SOCK_STREAM, 0);
@@ -103,20 +103,20 @@ int main(int argc, char **argv) {
mutator.option_value = IPTOS_LOWDELAY;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"set_socket_with_mutator",
- grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator)));
+ grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator)));
mutator.option_value = IPTOS_THROUGHPUT;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"set_socket_with_mutator",
- grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator)));
+ grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator)));
mutator.option_value = IPTOS_RELIABILITY;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"set_socket_with_mutator",
- grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator)));
+ grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator)));
mutator.option_value = -1;
- err = grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator);
+ err = grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator);
GPR_ASSERT(err != GRPC_ERROR_NONE);
GRPC_ERROR_UNREF(err);
@@ -127,6 +127,6 @@ int main(int argc, char **argv) {
#else /* GRPC_POSIX_SOCKET */
-int main(int argc, char **argv) { return 1; }
+int main(int argc, char** argv) { return 1; }
#endif /* GRPC_POSIX_SOCKET */