summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-05-19 18:04:26 -0700
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-05-19 18:04:26 -0700
commit24873f0c06e6196a105f648e8fe29d19dcddd1de (patch)
treef0ad6ae52390a9ed3b63c6fe228da30f5cf92d7b /lib/vty.c
parent0299c0042783463ee007a6dba0de70dcf6fc36ee (diff)
lib: lib-warnings.patch
Remove compile warnings for the lib directory Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by:
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 114135760e..41e340131d 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2449,10 +2449,11 @@ vty_log (const char *level, const char *proto_str,
/* Async-signal-safe version of vty_log for fixed strings. */
void
-vty_log_fixed (const char *buf, size_t len)
+vty_log_fixed (char *buf, size_t len)
{
unsigned int i;
struct iovec iov[2];
+ char crlf[4] = "\r\n";
/* vty may not have been initialised */
if (!vtyvec)
@@ -2460,7 +2461,7 @@ vty_log_fixed (const char *buf, size_t len)
iov[0].iov_base = (void *)buf;
iov[0].iov_len = len;
- iov[1].iov_base = (void *)"\r\n";
+ iov[1].iov_base = crlf;
iov[1].iov_len = 2;
for (i = 0; i < vector_active (vtyvec); i++)