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:
Bastien Nocera 2020-08-07 12:14:28 +02:00
parent 0d7178f9d6
commit a40954d148

View file

@ -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);