summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 93d7522)
raw | patch | inline | side by side (parent: 93d7522)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 6 Mar 2009 05:30:08 +0000 (05:30 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 6 Mar 2009 05:30:08 +0000 (05:30 +0000) |
program/src/rrd_daemon.c | patch | blob | history |
index 6445e55d6bad10ad207ea4d64ff73e4a413d4cee..7a72b070e088191af853c1b43dfc896eee515acb 100644 (file)
--- a/program/src/rrd_daemon.c
+++ b/program/src/rrd_daemon.c
va_start(argp, fmt);
#ifdef HAVE_VSNPRINTF
- len = vsnprintf(buffer, sizeof(buffer)-1, fmt, argp);
+ len = vsnprintf(buffer, sizeof(buffer), fmt, argp);
#else
len = vsprintf(buffer, fmt, argp);
#endif
rclen = sprintf(buffer, "%d ", lines);
va_start(argp, fmt);
#ifdef HAVE_VSNPRINTF
- len = vsnprintf(buffer+rclen, sizeof(buffer)-rclen-1, fmt, argp);
+ len = vsnprintf(buffer+rclen, sizeof(buffer)-rclen, fmt, argp);
#else
len = vsprintf(buffer+rclen, fmt, argp);
#endif
char *port;
int status;
- strncpy (addr_copy, sock->addr, sizeof (addr_copy));
+ strncpy (addr_copy, sock->addr, sizeof(addr_copy)-1);
addr_copy[sizeof (addr_copy) - 1] = 0;
addr = addr_copy;
{
listen_socket_t sock;
memset(&sock, 0, sizeof(sock));
- strncpy(sock.addr, RRDCACHED_DEFAULT_ADDRESS, sizeof(sock.addr));
+ strncpy(sock.addr, RRDCACHED_DEFAULT_ADDRESS, sizeof(sock.addr)-1);
open_listen_socket (&sock);
}