OSDN Git Service

treewide: Fix code issues detected using GCC 8
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / scsi / scsi_devinfo.c
index 75f2179..08062f2 100644 (file)
@@ -291,7 +291,7 @@ static void scsi_strcpy_devinfo(char *name, char *to, size_t to_length,
 
        from_length = strlen(from);
        /* this zero-pads the destination */
-       strncpy(to, from, to_length);
+       memcpy(to, from, to_length);
        if (from_length < to_length && !compatible) {
                /*
                 * space pad the string if it is short.