mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-03-23 21:51:26 +00:00
Merge branch 'coverity-fixes' into 'master'
fix coverity warnings See merge request GNOME/sysprof!96
This commit is contained in:
@ -169,7 +169,7 @@ sysprof_battery_charge_record_fiber (gpointer user_data)
|
|||||||
|
|
||||||
counter->id = ids[n_counters] = sysprof_capture_writer_request_counter (writer, 1);
|
counter->id = ids[n_counters] = sysprof_capture_writer_request_counter (writer, 1);
|
||||||
counter->type = SYSPROF_CAPTURE_COUNTER_INT64;
|
counter->type = SYSPROF_CAPTURE_COUNTER_INT64;
|
||||||
g_strlcpy (counter->category, "Battery Charge", sizeof counter->description);
|
g_strlcpy (counter->category, "Battery Charge", sizeof counter->category);
|
||||||
if (g_file_get_contents (model_name_path, &model_name_data, NULL, NULL))
|
if (g_file_get_contents (model_name_path, &model_name_data, NULL, NULL))
|
||||||
g_strlcpy (counter->name, g_strstrip (model_name_data), sizeof counter->name);
|
g_strlcpy (counter->name, g_strstrip (model_name_data), sizeof counter->name);
|
||||||
else
|
else
|
||||||
|
|||||||
@ -92,9 +92,6 @@ flags_to_string (GType type,
|
|||||||
if (!(flags_class = g_type_class_ref (type)))
|
if (!(flags_class = g_type_class_ref (type)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (flags_class == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
str = g_string_new (NULL);
|
str = g_string_new (NULL);
|
||||||
|
|
||||||
while ((str->len == 0 || value != 0) &&
|
while ((str->len == 0 || value != 0) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user