summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 065dbc0)
raw | patch | inline | side by side (parent: 065dbc0)
author | Florian Forster <octo@collectd.org> | |
Thu, 19 Oct 2017 05:26:34 +0000 (07:26 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 19 Oct 2017 05:26:34 +0000 (07:26 +0200) |
src/daemon/collectd.c | patch | blob | history | |
src/daemon/configfile.c | patch | blob | history | |
src/daemon/globals.c | patch | blob | history |
diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c
index 4df11bcf8f8491e732bd654e7443ad919a594a65..dd9b12f85669cfc2e490320308b3bd3b0adaf37e 100644 (file)
--- a/src/daemon/collectd.c
+++ b/src/daemon/collectd.c
/* read options */
while (1) {
int c;
- c = getopt(argc, argv,
- "htTC:"
+ c = getopt(argc, argv, "htTC:"
#if COLLECT_DAEMON
- "fP:"
+ "fP:"
#endif
- );
+ );
if (c == -1)
break;
int exit_status = 0;
struct cmdline_config config = {
- .daemonize = 1,
- .create_basedir = 1,
- .configfile = CONFIGFILE,
+ .daemonize = 1, .create_basedir = 1, .configfile = CONFIGFILE,
};
read_cmdline(argc, argv, &config);
#ifdef KERNEL_LINUX
&& notify_upstart() == 0 && notify_systemd() == 0
#endif
- ) {
+ ) {
int status;
if ((pid = fork()) == -1) {
index 83e44b72cdb31b51b2b1ef814d4c50716e234f93..f5086ae64de751f75c8b9bc20139a9e81c074a5f 100644 (file)
--- a/src/daemon/configfile.c
+++ b/src/daemon/configfile.c
return 0;
}
- temp =
- realloc(dst->children, sizeof(oconfig_item_t) *
- (dst->children_num + src->children_num - 1));
+ temp = realloc(dst->children,
+ sizeof(oconfig_item_t) *
+ (dst->children_num + src->children_num - 1));
if (temp == NULL) {
ERROR("configfile: realloc failed.");
return -1;
if ((src == NULL) || (src->children_num == 0))
return 0;
- temp = realloc(dst->children, sizeof(oconfig_item_t) *
- (dst->children_num + src->children_num));
+ temp =
+ realloc(dst->children,
+ sizeof(oconfig_item_t) * (dst->children_num + src->children_num));
if (temp == NULL) {
ERROR("configfile: realloc failed.");
return -1;
diff --git a/src/daemon/globals.c b/src/daemon/globals.c
index 207ca05d68362a4ab168c6d16b968db3394c58b9..5c6749ff83d57b9074f6c73c247e8ceeb9f3fc5e 100644 (file)
--- a/src/daemon/globals.c
+++ b/src/daemon/globals.c
* DEALINGS IN THE SOFTWARE.
**/
-#include "globals.h"
#include "common.h"
+#include "globals.h"
#if HAVE_KSTAT_H
#include <kstat.h>