diff options
author | Stef Walter <stef@memberwebs.com> | 2006-01-28 00:03:46 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-01-28 00:03:46 +0000 |
commit | 987a76bee76417887bd8d09f743691dbd3872f7d (patch) | |
tree | de921021eafd6e4a1a8242ebd0043ccd906725a8 | |
parent | 8b45597a9a24925b3a62c4fe793661bfbc682bcc (diff) |
Clean up MIB warnings.
-rw-r--r-- | daemon/rrdbotd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/daemon/rrdbotd.c b/daemon/rrdbotd.c index 9ba17a4..94212b5 100644 --- a/daemon/rrdbotd.c +++ b/daemon/rrdbotd.c @@ -169,10 +169,16 @@ rb_vmessage(int level, int err, const char* msg, va_list ap) } ASSERT (msg); - snprintf(buf, MAX_MSGLEN, "%s%s", msg, err ? ": " : ""); + + /* Cleanup the message a little */ + strlcpy(buf, msg, MAX_MSGLEN); + trim_end(buf); if(err) + { + strlcat(buf, ": ", MAX_MSGLEN); strncat(buf, strerror(e), MAX_MSGLEN); + } /* As a precaution */ buf[MAX_MSGLEN - 1] = 0; |