Skip to content

Commit 1babc85

Browse files
committed
Input: alps - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: Andy Shevchenko <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 4ecc731 commit 1babc85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/input/mouse/alps.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,9 +1408,9 @@ static int alps_do_register_bare_ps2_mouse(struct alps_data *priv)
14081408
return -ENOMEM;
14091409
}
14101410

1411-
snprintf(priv->phys3, sizeof(priv->phys3), "%s/%s",
1412-
psmouse->ps2dev.serio->phys,
1413-
(priv->dev2 ? "input2" : "input1"));
1411+
scnprintf(priv->phys3, sizeof(priv->phys3), "%s/%s",
1412+
psmouse->ps2dev.serio->phys,
1413+
(priv->dev2 ? "input2" : "input1"));
14141414
dev3->phys = priv->phys3;
14151415

14161416
/*

0 commit comments

Comments
 (0)