mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 06:40:04 +01:00
Merge branch 'kate/wip/fix-set-gerrer' into 'master'
linux: up-device-supply-battery: Fix assigning an error to a non-NULL GError pointer Closes #331 See merge request upower/upower!295
This commit is contained in:
commit
e880aa11a5
1 changed files with 2 additions and 4 deletions
|
|
@ -711,9 +711,8 @@ up_device_supply_battery_set_battery_charge_thresholds(UpDevice *device, guint s
|
|||
if (start != G_MAXUINT) {
|
||||
g_string_printf (start_str, "%d", CLAMP (start, 0, 100));
|
||||
if (!g_file_set_contents_full (start_filename, start_str->str, start_str->len,
|
||||
G_FILE_SET_CONTENTS_ONLY_EXISTING, 0644, error)) {
|
||||
G_FILE_SET_CONTENTS_ONLY_EXISTING, 0644, NULL))
|
||||
err_count++;
|
||||
}
|
||||
} else {
|
||||
g_debug ("Ignore charge_control_start_threshold setting");
|
||||
}
|
||||
|
|
@ -721,9 +720,8 @@ up_device_supply_battery_set_battery_charge_thresholds(UpDevice *device, guint s
|
|||
if (end != G_MAXUINT) {
|
||||
g_string_printf (end_str, "%d", CLAMP (end, 0, 100));
|
||||
if (!g_file_set_contents_full (end_filename, end_str->str, end_str->len,
|
||||
G_FILE_SET_CONTENTS_ONLY_EXISTING, 0644, error)) {
|
||||
G_FILE_SET_CONTENTS_ONLY_EXISTING, 0644, NULL))
|
||||
err_count++;
|
||||
}
|
||||
} else {
|
||||
g_debug ("Ignore charge_control_end_threshold setting");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue