gcc4 cleanups
This commit is contained in:
parent
5af595bd88
commit
dbdb641572
@ -45,7 +45,7 @@ void net_submit(char *hostname, char *plugin, char *filename, int ds_id, char *d
|
|||||||
int net_receive(int socket)
|
int net_receive(int socket)
|
||||||
{
|
{
|
||||||
char *hostname, *plugin, *filename, *ds_id, *data;
|
char *hostname, *plugin, *filename, *ds_id, *data;
|
||||||
int size, num;
|
int size;
|
||||||
|
|
||||||
size = recv(socket, rx_buf, BUFSIZE, 0);
|
size = recv(socket, rx_buf, BUFSIZE, 0);
|
||||||
|
|
||||||
|
@ -71,6 +71,8 @@ static void probe(void)
|
|||||||
char *buffer;
|
char *buffer;
|
||||||
struct meminfo_ meminfo;
|
struct meminfo_ meminfo;
|
||||||
|
|
||||||
|
memset(&meminfo, 0, sizeof(meminfo));
|
||||||
|
|
||||||
buffer = malloc(BUFSIZE);
|
buffer = malloc(BUFSIZE);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
log_print(LOG_WARN, "plugin memory: out of memory");
|
log_print(LOG_WARN, "plugin memory: out of memory");
|
||||||
|
2
p_stat.c
2
p_stat.c
@ -72,6 +72,8 @@ static void probe(void)
|
|||||||
char *buffer;
|
char *buffer;
|
||||||
struct proc_ proc;
|
struct proc_ proc;
|
||||||
|
|
||||||
|
memset(&proc, 0, sizeof(proc));
|
||||||
|
|
||||||
buffer = malloc(BUFSIZE);
|
buffer = malloc(BUFSIZE);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
log_print(LOG_WARN, "plugin stat: out of memory");
|
log_print(LOG_WARN, "plugin stat: out of memory");
|
||||||
|
@ -54,6 +54,8 @@ static void probe(void)
|
|||||||
char *buffer;
|
char *buffer;
|
||||||
struct vmstat_ vmstat;
|
struct vmstat_ vmstat;
|
||||||
|
|
||||||
|
memset(&vmstat, 0, sizeof(vmstat));
|
||||||
|
|
||||||
buffer = malloc(BUFSIZE);
|
buffer = malloc(BUFSIZE);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
log_print(LOG_WARN, "plugin vmstat: out of memory");
|
log_print(LOG_WARN, "plugin vmstat: out of memory");
|
||||||
|
Loading…
Reference in New Issue
Block a user