mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-08 07:48:08 +02:00
main: Fix fprintf security build warning
../src/ppd-utils.c: In function 'ppd_utils_write_sysfs':
../src/ppd-utils.c:36:3: error: format not a string literal and no format arguments [-Werror=format-security]
36 | ret = fprintf (sysfsfp, value);
| ^~~
This commit is contained in:
parent
0d7178f9d6
commit
a40954d148
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ gboolean ppd_utils_write_sysfs (GUdevDevice *device,
|
|||
g_debug ("Could not open for writing '%s'", filename);
|
||||
return FALSE;
|
||||
}
|
||||
ret = fprintf (sysfsfp, value);
|
||||
ret = fprintf (sysfsfp, "%s", value);
|
||||
if (ret < 0) {
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno),
|
||||
"Error writing '%s'", filename);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue