Skip to content

Commit

Permalink
clocksource: exynos_mct: silence a static checker warning
Browse files Browse the repository at this point in the history
My guess is we aren't going to have a 2 digit cpuid here any time soon
but the static checkers don't know that and complain that the snprintf()
could overflow.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Dan Carpenter authored and Daniel Lezcano committed Mar 11, 2014
1 parent cd32529 commit 09e1517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clocksource/exynos_mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
mevt = container_of(evt, struct mct_clock_event_device, evt);

mevt->base = EXYNOS4_MCT_L_BASE(cpu);
sprintf(mevt->name, "mct_tick%d", cpu);
snprintf(mevt->name, sizeof(mevt->name), "mct_tick%d", cpu);

evt->name = mevt->name;
evt->cpumask = cpumask_of(cpu);
Expand Down

0 comments on commit 09e1517

Please sign in to comment.