1 --- netkit-rwho-0.17/rwhod/rwhod.c 2000-07-23 05:19:48.000000000 +0200
2 +++ netkit-rwho-0.17/rwhod/rwhod.c.ok 2006-09-24 15:35:26.000000000 +0200
12 static void broadcaster(void);
13 static int configure(int s);
14 static int verify(const char *name);
15 -static int getloadavg(double ptr[3], int n);
16 +int getloadavg(double ptr[3], int n);
19 * We communicate with each neighbor in
21 wd.wd_hostname[sizeof(wd.wd_hostname)-1] = 0;
22 if (!verify(wd.wd_hostname)) {
23 syslog(LOG_WARNING, "malformed host name from %x",
25 + from.sin_addr.s_addr);
28 snprintf(path, sizeof(path), "whod.%s", wd.wd_hostname);
31 mynamelen = strlen(myname);
32 if (mynamelen > sizeof(mywd.wd_hostname))
33 - mynamelen = sizeof(mywd.wd_hostname);
34 + mynamelen = sizeof(mywd.wd_hostname) - 1;
35 strncpy(mywd.wd_hostname, myname, mynamelen);
36 - mywd.wd_hostname[sizeof(mywd.wd_hostname)-1] = 0;
37 + mywd.wd_hostname[mynamelen] = 0;