diff options
author | rbuj <[email protected]> | 2020-06-10 13:27:39 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-06-11 15:42:07 +0200 |
commit | fbb4a288d29950be3ae289df130a5ced15658ae8 (patch) | |
tree | ce546b6be03e5c6fbf08bd2a6cea2a053b5d5de8 /sensors-applet/active-sensor.c | |
parent | cb3dfb26f1ae0f23f1e9ad67a35112ea171a1a90 (diff) | |
download | mate-sensors-applet-fbb4a288d29950be3ae289df130a5ced15658ae8.tar.bz2 mate-sensors-applet-fbb4a288d29950be3ae289df130a5ced15658ae8.tar.xz |
Replace g_malloc0 with g_new0 and g_strdup
Diffstat (limited to 'sensors-applet/active-sensor.c')
-rw-r--r-- | sensors-applet/active-sensor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sensors-applet/active-sensor.c b/sensors-applet/active-sensor.c index 27619ac..7cf9df5 100644 --- a/sensors-applet/active-sensor.c +++ b/sensors-applet/active-sensor.c @@ -378,14 +378,14 @@ static void active_sensor_set_graph_dimensions(ActiveSensor *as, old_num_samples = as->num_samples; as->num_samples = num_samples; - as->sensor_values = g_malloc0(sizeof(gdouble)*as->num_samples); + as->sensor_values = g_new0 (gdouble, as->num_samples); memcpy(as->sensor_values, old_values, MIN(old_num_samples, as->num_samples)*sizeof(gdouble)); g_free(old_values); } else { - as->sensor_values = g_malloc0(sizeof(gdouble)*num_samples); + as->sensor_values = g_new0 (gdouble, num_samples); as->num_samples = num_samples; } |