From 769561cbe9ff04e02502832cae676fc591716866 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 27 May 2018 21:14:37 +0200 Subject: [PATCH] std: Improve prototypes of some functions. --- src/hardware/hameg-hmo/api.c | 4 ++-- src/libsigrok-internal.h | 6 +++--- src/std.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 8638a790..1274b919 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -366,11 +366,11 @@ static int config_list(uint32_t key, GVariant **data, case SR_CONF_DEVICE_OPTIONS: if (!cg) { if (model) - *data = std_gvar_array_u32((const uint32_t *)model->devopts, model->num_devopts); + *data = std_gvar_array_u32(*model->devopts, model->num_devopts); else *data = std_gvar_array_u32(ARRAY_AND_SIZE(drvopts)); } else if (cg_type == CG_ANALOG) { - *data = std_gvar_array_u32((const uint32_t *)model->devopts_cg_analog, model->num_devopts_cg_analog); + *data = std_gvar_array_u32(*model->devopts_cg_analog, model->num_devopts_cg_analog); } else { *data = std_gvar_array_u32(NULL, 0); } diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 65aedbe4..bd308472 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -978,9 +978,9 @@ SR_PRIV GVariant *std_gvar_min_max_step_thresholds(const double dmin, const doub SR_PRIV GVariant *std_gvar_tuple_u64(uint64_t low, uint64_t high); SR_PRIV GVariant *std_gvar_tuple_double(double low, double high); -SR_PRIV GVariant *std_gvar_array_i32(const int32_t *a, unsigned int n); -SR_PRIV GVariant *std_gvar_array_u32(const uint32_t *a, unsigned int n); -SR_PRIV GVariant *std_gvar_array_u64(const uint64_t *a, unsigned int n); +SR_PRIV GVariant *std_gvar_array_i32(const int32_t a[], unsigned int n); +SR_PRIV GVariant *std_gvar_array_u32(const uint32_t a[], unsigned int n); +SR_PRIV GVariant *std_gvar_array_u64(const uint64_t a[], unsigned int n); SR_PRIV GVariant *std_gvar_array_str(const char *a[], unsigned int n); SR_PRIV GVariant *std_gvar_thresholds(const double a[][2], unsigned int n); diff --git a/src/std.c b/src/std.c index 6403d01a..522606f8 100644 --- a/src/std.c +++ b/src/std.c @@ -749,19 +749,19 @@ SR_PRIV GVariant *std_gvar_tuple_double(double low, double high) return g_variant_new_tuple(range, 2); } -SR_PRIV GVariant *std_gvar_array_i32(const int32_t *a, unsigned int n) +SR_PRIV GVariant *std_gvar_array_i32(const int32_t a[], unsigned int n) { return g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, a, n, sizeof(int32_t)); } -SR_PRIV GVariant *std_gvar_array_u32(const uint32_t *a, unsigned int n) +SR_PRIV GVariant *std_gvar_array_u32(const uint32_t a[], unsigned int n) { return g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, a, n, sizeof(uint32_t)); } -SR_PRIV GVariant *std_gvar_array_u64(const uint64_t *a, unsigned int n) +SR_PRIV GVariant *std_gvar_array_u64(const uint64_t a[], unsigned int n) { return g_variant_new_fixed_array(G_VARIANT_TYPE_UINT64, a, n, sizeof(uint64_t));