screenlock: set max field width for sprintf
Stop a compiler warning about overwriting the 100 char buffer with larger string. programs/sxmo_screenlock.c:61:3: note: ‘sprintf’ output between 39 and 294 bytes into a destination of size 100
This commit is contained in:
parent
2cec0fc3be
commit
5a4ce877df
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ configuresuspendsettingsandwakeupsources()
|
|||
while ((wakeupsource = readdir(wakeupsources)) != NULL) {
|
||||
sprintf(
|
||||
wakeuppath,
|
||||
"/sys/class/wakeup/%s/device/power/wakeup",
|
||||
"/sys/class/wakeup/%.50s/device/power/wakeup",
|
||||
wakeupsource->d_name
|
||||
);
|
||||
fprintf(stderr, "Disabling wakeup source: %s", wakeupsource->d_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue