aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-08-10 10:06:43 -0700
committerGravatar murgatroid99 <mlumish@google.com>2016-08-10 10:06:43 -0700
commit7e924a0dd4dfc98c7ef00e79a651d28c56ca3907 (patch)
treebb5a10d7abcd9b331d9ff398355a4d7ff18493fb
parent165e5066e4c80f8d40c0ff5526d750aead2d6e98 (diff)
Clang format
-rw-r--r--src/core/lib/iomgr/ev_epoll_linux.h2
-rw-r--r--src/core/lib/iomgr/pollset_set_windows.c2
-rw-r--r--src/core/lib/iomgr/port.h2
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.c3
-rw-r--r--src/core/lib/iomgr/socket_utils.h3
-rw-r--r--src/core/lib/iomgr/socket_utils_common_posix.c3
-rw-r--r--src/core/lib/iomgr/socket_utils_windows.c5
-rw-r--r--src/core/lib/security/credentials/google_default/credentials_generic.c5
-rw-r--r--src/core/lib/security/credentials/google_default/google_default_credentials.h8
9 files changed, 16 insertions, 17 deletions
diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h
index e6d5441236..8fc3ff59a3 100644
--- a/src/core/lib/iomgr/ev_epoll_linux.h
+++ b/src/core/lib/iomgr/ev_epoll_linux.h
@@ -34,8 +34,8 @@
#ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H
#define GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H
-#include "src/core/lib/iomgr/port.h"
#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/port.h"
const grpc_event_engine_vtable *grpc_init_epoll_linux(void);
diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c
index 293893f18e..645650db9b 100644
--- a/src/core/lib/iomgr/pollset_set_windows.c
+++ b/src/core/lib/iomgr/pollset_set_windows.c
@@ -31,8 +31,8 @@
*
*/
-#include "src/core/lib/iomgr/port.h"
#include <stdint.h>
+#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_WINSOCK_SOCKET
diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h
index 1cd0a29ee2..e6f01802ed 100644
--- a/src/core/lib/iomgr/port.h
+++ b/src/core/lib/iomgr/port.h
@@ -119,4 +119,4 @@
#error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_PORT_H */
+#endif /* GRPC_CORE_LIB_IOMGR_PORT_H */
diff --git a/src/core/lib/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.c
index 7f8e6ea3c3..ed1dac5622 100644
--- a/src/core/lib/iomgr/sockaddr_utils.c
+++ b/src/core/lib/iomgr/sockaddr_utils.c
@@ -157,8 +157,7 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr,
port = ntohs(addr6->sin6_port);
}
if (ip != NULL &&
- grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) !=
- NULL) {
+ grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != NULL) {
ret = gpr_join_host_port(out, ntop_buf, port);
} else {
ret = gpr_asprintf(out, "(sockaddr family=%d)", addr->sa_family);
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index f0b5a33b63..238061ea5a 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -43,7 +43,6 @@
#endif
/* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */
-const char *grpc_inet_ntop(int af, const void *src,
- char *dst, socklen_t size);
+const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size);
#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c
index 2143256846..aa844da078 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.c
+++ b/src/core/lib/iomgr/socket_utils_common_posix.c
@@ -297,8 +297,7 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type,
return error_for_fd(*newfd, addr);
}
-const char *grpc_inet_ntop(int af, const void *src,
- char *dst, socklen_t size) {
+const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) {
return inet_ntop(af, src, dst, size);
}
diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c
index 41e53bd812..09dabd7a73 100644
--- a/src/core/lib/iomgr/socket_utils_windows.c
+++ b/src/core/lib/iomgr/socket_utils_windows.c
@@ -39,11 +39,10 @@
#include <grpc/support/log.h>
-const char *grpc_inet_ntop(int af, const void *src,
- char *dst, socklen_t size) {
+const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) {
GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t));
/* Windows InetNtopA wants a mutable ip pointer */
- return InetNtopA(af, (void*)src, dst, (size_t)size);
+ return InetNtopA(af, (void *)src, dst, (size_t)size);
}
#endif /* GRPC_WINDOWS_SOCKETUTILS */
diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.c b/src/core/lib/security/credentials/google_default/credentials_generic.c
index 02a6e9e9dd..013e3b5451 100644
--- a/src/core/lib/security/credentials/google_default/credentials_generic.c
+++ b/src/core/lib/security/credentials/google_default/credentials_generic.c
@@ -47,11 +47,10 @@ char *grpc_get_well_known_google_credentials_file_path_impl(void) {
char *base = gpr_getenv(GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR);
if (base == NULL) {
gpr_log(GPR_ERROR, "Could not get " GRPC_GOOGLE_CREDENTIALS_ENV_VAR
- " environment variable.");
+ " environment variable.");
return NULL;
}
- gpr_asprintf(&result, "%s/%s", base,
- GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX);
+ gpr_asprintf(&result, "%s/%s", base, GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX);
gpr_free(base);
return result;
}
diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h
index bc816bcb77..476e1839ca 100644
--- a/src/core/lib/security/credentials/google_default/google_default_credentials.h
+++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h
@@ -44,11 +44,15 @@
#ifdef GPR_WINDOWS
#define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "APPDATA"
-#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE
+#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \
+ GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \
+ "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE
#define GRPC_GOOGLE_CREDENTIALS_GENERIC 1
#else
#define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "HOME"
-#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX ".config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE
+#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \
+ ".config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \
+ "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE
#define GRPC_GOOGLE_CREDENTIALS_GENERIC 1
#endif