Skip to content
Commit 06755a87 authored by Seth Forshee's avatar Seth Forshee Committed by Michael Ellerman
Browse files

selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths



Currently sprintf is used, and while paths should never exceed
the size of the buffer it is theoretically possible since
dirent.d_name is 256 bytes. As a result this trips
-Wformat-overflow, and since the test is built with -Wall -Werror
the causes the build to fail. Switch to using snprintf and skip
any paths which are too long for the filename buffer.

Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 186b8f15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment