From 43dc08d777281f8b365773d5b63e4c8df316a11f Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Mon, 25 Feb 2013 17:43:25 +0000 Subject: [PATCH] --- yaml --- r: 360835 b: refs/heads/master c: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b h: refs/heads/master i: 360833: 9aefc2789c1245a8a582e5c055899e0c031e39a1 360831: 78cef9fb30e0b6908e372fc3d4b6f64c004e3ef8 v: v3 --- [refs] | 2 +- trunk/drivers/tty/hvc/hvcs.c | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 27f69edc42fe..53541410f75a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6b6680c4ea3952af8ae76915cbca41245147741b +refs/heads/master: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b diff --git a/trunk/drivers/tty/hvc/hvcs.c b/trunk/drivers/tty/hvc/hvcs.c index 1956593ee89d..81e939e90c4c 100644 --- a/trunk/drivers/tty/hvc/hvcs.c +++ b/trunk/drivers/tty/hvc/hvcs.c @@ -881,17 +881,12 @@ static struct vio_driver hvcs_vio_driver = { /* Only called from hvcs_get_pi please */ static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd) { - int clclength; - hvcsd->p_unit_address = pi->unit_address; hvcsd->p_partition_ID = pi->partition_ID; - clclength = strlen(&pi->location_code[0]); - if (clclength > HVCS_CLC_LENGTH) - clclength = HVCS_CLC_LENGTH; /* copy the null-term char too */ - strncpy(&hvcsd->p_location_code[0], - &pi->location_code[0], clclength + 1); + strlcpy(&hvcsd->p_location_code[0], + &pi->location_code[0], sizeof(hvcsd->p_location_code)); } /*