tty: hvcs: Fix odd use of strlcpy
authorJoe Perches <joe@perches.com>
Thu, 4 Jul 2019 23:57:47 +0000 (16:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 10:43:44 +0000 (12:43 +0200)
Use the typical style of array, not the equivalent &array[0].

Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/1be432798311378947ec4e6051cad1235b6eccbb.1562283944.git.joe@perches.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvcs.c

index 5fb214e..ee0604c 100644 (file)
@@ -871,8 +871,8 @@ static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd)
        hvcsd->p_partition_ID  = pi->partition_ID;
 
        /* copy the null-term char too */
-       strlcpy(&hvcsd->p_location_code[0],
-                       &pi->location_code[0], sizeof(hvcsd->p_location_code));
+       strlcpy(hvcsd->p_location_code, pi->location_code,
+               sizeof(hvcsd->p_location_code));
 }
 
 /*