X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Funixsock.c;h=d4bf004731abf3142253a9833a742004f48420a0;hb=290741f2e6de9e9b467463c1f0c6f031c4036428;hp=e62ed6c0596b5ddb29848e66805d6e5ffd036f1c;hpb=2c7b491427fd84c9e24c9d41686a15ce42219a0b;p=collectd.git diff --git a/src/unixsock.c b/src/unixsock.c index e62ed6c0..d4bf0047 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -36,10 +36,6 @@ #include "utils_cmd_putval.h" #include "utils_cmd_putnotif.h" -/* Folks without pthread will need to disable this plugin. */ -#include - -#include #include #include @@ -152,7 +148,7 @@ static int us_open_socket (void) do { - char *grpname; + const char *grpname; struct group *g; struct group sg; char grbuf[2048]; @@ -369,7 +365,7 @@ static void *us_server_thread (void __attribute__((unused)) *arg) pthread_exit ((void *) 1); } - remote_fd = (int *) malloc (sizeof (int)); + remote_fd = malloc (sizeof (*remote_fd)); if (remote_fd == NULL) { char errbuf[1024];