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)
|
||||
{
|
||||
char *hostname, *plugin, *filename, *ds_id, *data;
|
||||
int size, num;
|
||||
int size;
|
||||
|
||||
size = recv(socket, rx_buf, BUFSIZE, 0);
|
||||
|
||||
|
@ -71,6 +71,8 @@ static void probe(void)
|
||||
char *buffer;
|
||||
struct meminfo_ meminfo;
|
||||
|
||||
memset(&meminfo, 0, sizeof(meminfo));
|
||||
|
||||
buffer = malloc(BUFSIZE);
|
||||
if (buffer == NULL) {
|
||||
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;
|
||||
struct proc_ proc;
|
||||
|
||||
memset(&proc, 0, sizeof(proc));
|
||||
|
||||
buffer = malloc(BUFSIZE);
|
||||
if (buffer == NULL) {
|
||||
log_print(LOG_WARN, "plugin stat: out of memory");
|
||||
|
@ -54,6 +54,8 @@ static void probe(void)
|
||||
char *buffer;
|
||||
struct vmstat_ vmstat;
|
||||
|
||||
memset(&vmstat, 0, sizeof(vmstat));
|
||||
|
||||
buffer = malloc(BUFSIZE);
|
||||
if (buffer == NULL) {
|
||||
log_print(LOG_WARN, "plugin vmstat: out of memory");
|
||||
|
Loading…
Reference in New Issue
Block a user