From db48fe01c48c59535febd58a01303225333b69c1 Mon Sep 17 00:00:00 2001 From: shahramn Date: Tue, 12 Nov 2024 22:04:41 +0000 Subject: [PATCH] Cosmetics --- src/accessor/grib_accessor_class_bufr_data_array.cc | 12 +++--------- .../grib_accessor_class_expanded_descriptors.cc | 4 +--- src/accessor/grib_accessor_class_group.cc | 4 +--- src/accessor/grib_accessor_class_library_version.cc | 4 +--- .../grib_accessor_class_sexagesimal2decimal.cc | 4 +--- .../grib_accessor_class_smart_table_column.cc | 4 +--- 6 files changed, 8 insertions(+), 24 deletions(-) diff --git a/src/accessor/grib_accessor_class_bufr_data_array.cc b/src/accessor/grib_accessor_class_bufr_data_array.cc index 80bae77e7..f399d0563 100644 --- a/src/accessor/grib_accessor_class_bufr_data_array.cc +++ b/src/accessor/grib_accessor_class_bufr_data_array.cc @@ -1775,21 +1775,15 @@ grib_accessor* grib_accessor_bufr_data_array_t::create_accessor_from_descriptor( long ide, long subset, int add_dump_flag, int add_coord_flag, int count, int add_extra_attributes) { - char code[10] = { - 0, - }; + char code[10] = {0,}; char* temp_str = NULL; int idx = 0; unsigned long flags = GRIB_ACCESSOR_FLAG_READ_ONLY; - grib_action operatorCreator = { - 0, - }; + grib_action operatorCreator = {0,}; grib_accessor* accessor = NULL; grib_accessor_bufr_data_element_t* elementAccessor = NULL; grib_accessor_variable_t* variableAccessor = NULL; - grib_action creator = { - 0, - }; + grib_action creator = {0,}; creator.op = (char*)"bufr_data_element"; creator.name_space = (char*)""; creator.set = 0; diff --git a/src/accessor/grib_accessor_class_expanded_descriptors.cc b/src/accessor/grib_accessor_class_expanded_descriptors.cc index 1e3733256..ae5ab9265 100644 --- a/src/accessor/grib_accessor_class_expanded_descriptors.cc +++ b/src/accessor/grib_accessor_class_expanded_descriptors.cc @@ -94,9 +94,7 @@ void grib_accessor_expanded_descriptors_t::__expand(bufr_descriptors_array* unex bufr_descriptor* vv = NULL; /* ECC-1422: 'ur' is the array of bufr_descriptor pointers for replications. * Its max size is X (from FXY) which is 6 bits so no need for malloc */ - bufr_descriptor* ur[65] = { - 0, - }; + bufr_descriptor* ur[65] = {0,}; bufr_descriptor* urc = NULL; size_t idx = 0; bufr_descriptor* u0 = NULL; diff --git a/src/accessor/grib_accessor_class_group.cc b/src/accessor/grib_accessor_class_group.cc index a39cf0519..9a3841683 100644 --- a/src/accessor/grib_accessor_class_group.cc +++ b/src/accessor/grib_accessor_class_group.cc @@ -94,9 +94,7 @@ int grib_accessor_group_t::unpack_string(char* val, size_t* len) int grib_accessor_group_t::unpack_long(long* v, size_t* len) { - char val[1024] = { - 0, - }; + char val[1024] = {0,}; size_t l = sizeof(val); size_t i = 0; char* last = NULL; diff --git a/src/accessor/grib_accessor_class_library_version.cc b/src/accessor/grib_accessor_class_library_version.cc index 0a31d1df3..93bcc2a35 100644 --- a/src/accessor/grib_accessor_class_library_version.cc +++ b/src/accessor/grib_accessor_class_library_version.cc @@ -15,9 +15,7 @@ grib_accessor* grib_accessor_library_version = &_grib_accessor_library_version; int grib_accessor_library_version_t::unpack_string(char* val, size_t* len) { - char result[30] = { - 0, - }; + char result[30] = {0,}; size_t size = 0; int major = ECCODES_MAJOR_VERSION; diff --git a/src/accessor/grib_accessor_class_sexagesimal2decimal.cc b/src/accessor/grib_accessor_class_sexagesimal2decimal.cc index a95cd4fe9..0ea176d47 100644 --- a/src/accessor/grib_accessor_class_sexagesimal2decimal.cc +++ b/src/accessor/grib_accessor_class_sexagesimal2decimal.cc @@ -32,9 +32,7 @@ long grib_accessor_sexagesimal2decimal_t::get_native_type() int grib_accessor_sexagesimal2decimal_t::unpack_string(char* val, size_t* len) { int err = 0; - char buff[512] = { - 0, - }; + char buff[512] = {0,}; size_t length = 0; size_t size = sizeof(buff); char* p = 0; diff --git a/src/accessor/grib_accessor_class_smart_table_column.cc b/src/accessor/grib_accessor_class_smart_table_column.cc index 2384d7234..113f5d45f 100644 --- a/src/accessor/grib_accessor_class_smart_table_column.cc +++ b/src/accessor/grib_accessor_class_smart_table_column.cc @@ -48,9 +48,7 @@ int grib_accessor_smart_table_column_t::unpack_string_array(char** buffer, size_ size_t size = 1; long* code; int err = GRIB_SUCCESS; - char tmp[1024] = { - 0, - }; + char tmp[1024] = {0,}; int i = 0; tableAccessor = (grib_accessor_smart_table_t*)grib_find_accessor(grib_handle_of_accessor(this), smartTable_);