Skip to content

Commit 5b0dd36

Browse files
committed
Format changed files.
1 parent cbc127a commit 5b0dd36

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

src/daemon/plugin.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,8 @@ static void start_write_threads(size_t num) /* {{{ */
848848
}
849849

850850
char name[THREAD_NAME_MAX];
851-
snprintf(name, sizeof(name), "writer#%" PRIu64, (uint64_t)write_threads_num);
851+
snprintf(name, sizeof(name), "writer#%" PRIu64,
852+
(uint64_t)write_threads_num);
852853
set_thread_name(write_threads[write_threads_num], name);
853854

854855
write_threads_num++;
@@ -960,9 +961,9 @@ static void plugin_free_loaded(void) {
960961

961962
#define BUFSIZE 512
962963
#ifdef WIN32
963-
# define SHLIB_SUFFIX ".dll"
964+
#define SHLIB_SUFFIX ".dll"
964965
#else
965-
# define SHLIB_SUFFIX ".so"
966+
#define SHLIB_SUFFIX ".so"
966967
#endif
967968
int plugin_load(char const *plugin_name, _Bool global) {
968969
DIR *dh;
@@ -1004,7 +1005,8 @@ int plugin_load(char const *plugin_name, _Bool global) {
10041005
* type when matching the filename */
10051006
status = snprintf(typename, sizeof(typename), "%s" SHLIB_SUFFIX, plugin_name);
10061007
if ((status < 0) || ((size_t)status >= sizeof(typename))) {
1007-
WARNING("plugin_load: Filename too long: \"%s" SHLIB_SUFFIX "\"", plugin_name);
1008+
WARNING("plugin_load: Filename too long: \"%s" SHLIB_SUFFIX "\"",
1009+
plugin_name);
10081010
return -1;
10091011
}
10101012

src/daemon/utils_random.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ double erand48(unsigned short unused[3]) {
3636
return (double)rand() / (double)RAND_MAX;
3737
}
3838

39-
long int jrand48(unsigned short unused[3]) {
40-
return rand();
41-
}
39+
long int jrand48(unsigned short unused[3]) { return rand(); }
4240
#endif
4341

4442
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;

src/libcollectdclient/client.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,8 @@ static int lcc_open_netsocket(lcc_connection_t *c, /* {{{ */
463463
}
464464
}
465465

466-
struct addrinfo ai_hints = {.ai_family = AF_UNSPEC,
467-
.ai_flags = 0,
468-
.ai_socktype = SOCK_STREAM};
466+
struct addrinfo ai_hints = {
467+
.ai_family = AF_UNSPEC, .ai_flags = 0, .ai_socktype = SOCK_STREAM};
469468
#ifdef AI_ADDRCONFIG
470469
ai_hints.ai_flags = AI_ADDRCONFIG;
471470
#endif

src/libcollectdclient/network.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,8 @@ static int server_open_socket(lcc_server_t *srv) /* {{{ */
126126
if (srv->fd >= 0)
127127
server_close_socket(srv);
128128

129-
struct addrinfo ai_hints = {.ai_family = AF_UNSPEC,
130-
.ai_flags = 0,
131-
.ai_socktype = SOCK_DGRAM};
129+
struct addrinfo ai_hints = {
130+
.ai_family = AF_UNSPEC, .ai_flags = 0, .ai_socktype = SOCK_DGRAM};
132131
#ifdef AI_ADDRCONFIG
133132
ai_hints.ai_flags = AI_ADDRCONFIG;
134133
#endif
@@ -367,7 +366,8 @@ int lcc_server_set_ttl(lcc_server_t *srv, uint8_t ttl) /* {{{ */
367366
return 0;
368367
} /* }}} int lcc_server_set_ttl */
369368

370-
int lcc_server_set_interface(lcc_server_t *srv, char const *interface_) /* {{{ */
369+
int lcc_server_set_interface(lcc_server_t *srv,
370+
char const *interface_) /* {{{ */
371371
{
372372
unsigned int if_index;
373373
int status;

src/libcollectdclient/server.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,12 @@ static int server_multicast_join(lcc_listener_t *srv,
9191
#else
9292
#ifdef WIN32
9393
struct ip_mreq mreq = {
94-
.imr_interface.s_addr = INADDR_ANY,
95-
.imr_multiaddr.s_addr = sa->sin_addr.s_addr,
94+
.imr_interface.s_addr = INADDR_ANY,
95+
.imr_multiaddr.s_addr = sa->sin_addr.s_addr,
9696
};
9797
#else
9898
struct ip_mreq mreq = {
99-
.imr_address.s_addr = INADDR_ANY,
100-
.imr_multiaddr.s_addr = sa->s_addr,
99+
.imr_address.s_addr = INADDR_ANY, .imr_multiaddr.s_addr = sa->s_addr,
101100
};
102101
#endif /* WIN32 */
103102
#endif /* HAVE_STRUCT_IP_MREQN_IMR_IFINDEX */

0 commit comments

Comments
 (0)