From 6a1fbc7433969bc605d9fdcf2a6051ce537844bc Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Tue, 23 Oct 2018 20:00:16 +0200 Subject: [PATCH] snmp: fix coding style in last commit --- src/apps/snmp/snmp_scalar.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/apps/snmp/snmp_scalar.c b/src/apps/snmp/snmp_scalar.c index 913c2ec5..49371039 100644 --- a/src/apps/snmp/snmp_scalar.c +++ b/src/apps/snmp/snmp_scalar.c @@ -193,12 +193,11 @@ snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, st static s16_t snmp_scalar_array_get_value(struct snmp_node_instance *instance, void *value) { - snmp_err_t result = SNMP_ERR_NOSUCHINSTANCE; + s16_t result = SNMP_ERR_NOSUCHINSTANCE; const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; const struct snmp_scalar_array_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_ptr; - if (array_node->get_value != NULL) - { + if (array_node->get_value != NULL) { result = array_node->get_value(array_node_def, value); } return result; @@ -211,8 +210,7 @@ snmp_scalar_array_set_test(struct snmp_node_instance *instance, u16_t value_len, const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; const struct snmp_scalar_array_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_ptr; - if (array_node->set_test != NULL) - { + if (array_node->set_test != NULL) { result = array_node->set_test(array_node_def, value_len, value); } return result; @@ -225,8 +223,7 @@ snmp_scalar_array_set_value(struct snmp_node_instance *instance, u16_t value_len const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; const struct snmp_scalar_array_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_ptr; - if (array_node->set_value != NULL) - { + if (array_node->set_value != NULL) { result = array_node->set_value(array_node_def, value_len, value); } return result;