mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
s390/ccwgroup: increase string buffer size
Avoid false positive warnings like this with gcc 7.1: drivers/s390/cio/ccwgroup.c:41:21: warning: '%d' directive writing between 1 and 10 bytes into a region of size 4 sprintf(str, "cdev%d", i); and simply increase the size of the string buffer. Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
80ba38469a
commit
2685df6776
@ -35,7 +35,7 @@ static struct bus_type ccwgroup_bus_type;
|
||||
static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev)
|
||||
{
|
||||
int i;
|
||||
char str[8];
|
||||
char str[16];
|
||||
|
||||
for (i = 0; i < gdev->count; i++) {
|
||||
sprintf(str, "cdev%d", i);
|
||||
@ -238,7 +238,7 @@ static void ccwgroup_release(struct device *dev)
|
||||
|
||||
static int __ccwgroup_create_symlinks(struct ccwgroup_device *gdev)
|
||||
{
|
||||
char str[8];
|
||||
char str[16];
|
||||
int i, rc;
|
||||
|
||||
for (i = 0; i < gdev->count; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user