X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Funixsock.c;h=1840e34c45a157825fd8a9b8052a1b56500480ca;hb=8b3afb76805d0e0bbaf2b7ef3f37c07c1ebf0ffb;hp=e62ed6c0596b5ddb29848e66805d6e5ffd036f1c;hpb=f7f5868ee0378791ccd8d1788e27ebf2a02737dc;p=collectd.git diff --git a/src/unixsock.c b/src/unixsock.c index e62ed6c0..1840e34c 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -39,7 +39,6 @@ /* Folks without pthread will need to disable this plugin. */ #include -#include #include #include @@ -152,7 +151,7 @@ static int us_open_socket (void) do { - char *grpname; + const char *grpname; struct group *g; struct group sg; char grbuf[2048]; @@ -369,7 +368,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];