summaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorStephen Hemminger2009-03-19 03:11:29 +0100
committerDavid S. Miller2009-03-19 03:11:29 +0100
commit4b704d59d6fb152bcd0883b84af5936a29067f12 (patch)
tree037d55170484c0140e86e76fbf4a07c7ad40501d /net/tipc/bcast.c
parenttcp: remove parameter from tcp_recv_urg(). (diff)
downloadkernel-qcow2-linux-4b704d59d6fb152bcd0883b84af5936a29067f12.tar.gz
kernel-qcow2-linux-4b704d59d6fb152bcd0883b84af5936a29067f12.tar.xz
kernel-qcow2-linux-4b704d59d6fb152bcd0883b84af5936a29067f12.zip
tipc: fix non-const printf format arguments
Fix warnings from current gcc about using non-const strings as printf args in TIPC. Compile tested only (not a TIPC user). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 3ddaff42d1bb..a3bfd4064912 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -119,7 +119,7 @@ static struct bclink *bclink = NULL;
static struct link *bcl = NULL;
static DEFINE_SPINLOCK(bc_lock);
-char tipc_bclink_name[] = "multicast-link";
+const char tipc_bclink_name[] = "multicast-link";
static u32 buf_seqno(struct sk_buff *buf)
@@ -800,7 +800,7 @@ int tipc_bclink_init(void)
tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT);
bcl->b_ptr = &bcbearer->bearer;
bcl->state = WORKING_WORKING;
- sprintf(bcl->name, tipc_bclink_name);
+ strlcpy(bcl->name, tipc_bclink_name, TIPC_MAX_LINK_NAME);
if (BCLINK_LOG_BUF_SIZE) {
char *pb = kmalloc(BCLINK_LOG_BUF_SIZE, GFP_ATOMIC);