Skip to content

Commit ce098f2

Browse files
committed
Input: lifebook - 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 1babc85 commit ce098f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/input/mouse/lifebook.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ static int lifebook_create_relative_device(struct psmouse *psmouse)
279279
goto err_out;
280280

281281
priv->dev2 = dev2;
282-
snprintf(priv->phys, sizeof(priv->phys),
283-
"%s/input1", psmouse->ps2dev.serio->phys);
282+
scnprintf(priv->phys, sizeof(priv->phys),
283+
"%s/input1", psmouse->ps2dev.serio->phys);
284284

285285
dev2->phys = priv->phys;
286286
dev2->name = "LBPS/2 Fujitsu Lifebook Touchpad";

0 commit comments

Comments
 (0)