@@ -1892,7 +1892,7 @@ static PlotIioChn * plot_iio_channel_new(struct iio_context *ctx)
1892
1892
{
1893
1893
PlotIioChn * obj ;
1894
1894
1895
- obj = calloc (sizeof (PlotIioChn ), 1 );
1895
+ obj = calloc (1 , sizeof (PlotIioChn ));
1896
1896
if (!obj ) {
1897
1897
fprintf (stderr , "Error in %s: %s" , __func__ , strerror (errno ));
1898
1898
return NULL ;
@@ -1975,7 +1975,7 @@ static PlotMathChn * plot_math_channel_new(struct iio_context *ctx)
1975
1975
{
1976
1976
PlotMathChn * obj ;
1977
1977
1978
- obj = calloc (sizeof (PlotMathChn ), 1 );
1978
+ obj = calloc (1 , sizeof (PlotMathChn ));
1979
1979
if (!obj ) {
1980
1980
fprintf (stderr , "Error in %s: %s" , __func__ , strerror (errno ));
1981
1981
return NULL ;
@@ -2474,7 +2474,7 @@ static void update_transform_settings(OscPlot *plot, Transform *transform)
2474
2474
XCORR_SETTINGS (transform )-> marker_type = NULL ;
2475
2475
XCORR_SETTINGS (transform )-> max_x_axis = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv -> sample_count_widget ));
2476
2476
} else if (plot_type == SPECTRUM_PLOT ) {
2477
- FREQ_SPECTRUM_SETTINGS (transform )-> ffts_alg_data = calloc (sizeof (struct _fft_alg_data ), priv -> fft_count );
2477
+ FREQ_SPECTRUM_SETTINGS (transform )-> ffts_alg_data = calloc (priv -> fft_count , sizeof (struct _fft_alg_data ));
2478
2478
FREQ_SPECTRUM_SETTINGS (transform )-> fft_count = priv -> fft_count ;
2479
2479
FREQ_SPECTRUM_SETTINGS (transform )-> freq_sweep_start = priv -> start_freq + priv -> filter_bw / 2 ;
2480
2480
FREQ_SPECTRUM_SETTINGS (transform )-> filter_bandwidth = priv -> filter_bw ;
@@ -2524,35 +2524,35 @@ static Transform* add_transform_to_list(OscPlot *plot, int tr_type, GSList *chan
2524
2524
switch (tr_type ) {
2525
2525
case TIME_TRANSFORM :
2526
2526
Transform_attach_function (transform , time_transform_function );
2527
- time_settings = (struct _time_settings * )calloc (sizeof (struct _time_settings ), 1 );
2527
+ time_settings = (struct _time_settings * )calloc (1 , sizeof (struct _time_settings ));
2528
2528
Transform_attach_settings (transform , time_settings );
2529
2529
transform -> graph_color = & PLOT_CHN (channels -> data )-> graph_color ;
2530
2530
break ;
2531
2531
case FFT_TRANSFORM :
2532
2532
Transform_attach_function (transform , fft_transform_function );
2533
- fft_settings = (struct _fft_settings * )calloc (sizeof (struct _fft_settings ), 1 );
2533
+ fft_settings = (struct _fft_settings * )calloc (1 , sizeof (struct _fft_settings ));
2534
2534
fft_settings -> window_correction = window_correction ;
2535
2535
Transform_attach_settings (transform , fft_settings );
2536
2536
break ;
2537
2537
case CONSTELLATION_TRANSFORM :
2538
2538
Transform_attach_function (transform , constellation_transform_function );
2539
- constellation_settings = (struct _constellation_settings * )calloc (sizeof (struct _constellation_settings ), 1 );
2539
+ constellation_settings = (struct _constellation_settings * )calloc (1 , sizeof (struct _constellation_settings ));
2540
2540
Transform_attach_settings (transform , constellation_settings );
2541
2541
break ;
2542
2542
case COMPLEX_FFT_TRANSFORM :
2543
2543
Transform_attach_function (transform , fft_transform_function );
2544
- fft_settings = (struct _fft_settings * )calloc (sizeof (struct _fft_settings ), 1 );
2544
+ fft_settings = (struct _fft_settings * )calloc (1 , sizeof (struct _fft_settings ));
2545
2545
fft_settings -> window_correction = window_correction ;
2546
2546
Transform_attach_settings (transform , fft_settings );
2547
2547
break ;
2548
2548
case CROSS_CORRELATION_TRANSFORM :
2549
2549
Transform_attach_function (transform , cross_correlation_transform_function );
2550
- xcross_settings = (struct _cross_correlation_settings * )calloc (sizeof (struct _cross_correlation_settings ), 1 );
2550
+ xcross_settings = (struct _cross_correlation_settings * )calloc (1 , sizeof (struct _cross_correlation_settings ));
2551
2551
Transform_attach_settings (transform , xcross_settings );
2552
2552
break ;
2553
2553
case FREQ_SPECTRUM_TRANSFORM :
2554
2554
Transform_attach_function (transform , freq_spectrum_transform_function );
2555
- freq_spectrum_settings = (struct _freq_spectrum_settings * )calloc (sizeof (struct _freq_spectrum_settings ), 1 );
2555
+ freq_spectrum_settings = (struct _freq_spectrum_settings * )calloc (1 , sizeof (struct _freq_spectrum_settings ));
2556
2556
Transform_attach_settings (transform , freq_spectrum_settings );
2557
2557
break ;
2558
2558
default :
@@ -2707,7 +2707,7 @@ static void transform_add_own_markers(OscPlot *plot, Transform *transform)
2707
2707
struct marker_type * markers ;
2708
2708
int i ;
2709
2709
2710
- markers = calloc (sizeof (struct marker_type ), MAX_MARKERS + 2 );
2710
+ markers = calloc (MAX_MARKERS + 2 , sizeof (struct marker_type ));
2711
2711
if (!markers ) {
2712
2712
fprintf (stderr ,
2713
2713
"Error: could not alloc memory for markers in %s\n" ,
0 commit comments