Message ID | 20240712152253.3702-3-ceggers@arri.de |
---|---|
State | Accepted |
Headers | show |
Series | parser: fix various data type problems | expand |
On 12.07.24 17:22, Christian Eggers wrote: > The libconfig/libjson adapters use "casts to double pointer" in this > case, so lets name it DOUBLE rather than FLOAT. > > Signed-off-by: Christian Eggers <ceggers@arri.de> > --- > corelib/parsing_library_libconfig.c | 2 +- > corelib/parsing_library_libjson.c | 2 +- > include/parselib.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c > index a3535e9ec0e4..ea4b03a476f5 100644 > --- a/corelib/parsing_library_libconfig.c > +++ b/corelib/parsing_library_libconfig.c > @@ -29,7 +29,7 @@ static unsigned int map_field_type(field_type_t type) > return CONFIG_TYPE_INT64; > case TYPE_BOOL: > return CONFIG_TYPE_BOOL; > - case TYPE_FLOAT: > + case TYPE_DOUBLE: > return CONFIG_TYPE_FLOAT; > default: /* not supported in SWUpdate */ > return CONFIG_TYPE_NONE; > diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c > index 86646676d419..187e4eadcc16 100644 > --- a/corelib/parsing_library_libjson.c > +++ b/corelib/parsing_library_libjson.c > @@ -30,7 +30,7 @@ static json_type map_field_type(field_type_t type) > return json_type_int; > case TYPE_BOOL: > return json_type_boolean; > - case TYPE_FLOAT: > + case TYPE_DOUBLE: > return json_type_double; > default: /* not supported in SWUpdate */ > return json_type_null; > diff --git a/include/parselib.h b/include/parselib.h > index b0142ff26840..4a8717e0aad2 100644 > --- a/include/parselib.h > +++ b/include/parselib.h > @@ -28,7 +28,7 @@ typedef enum { > TYPE_INT, > TYPE_INT64, > TYPE_BOOL, > - TYPE_FLOAT > + TYPE_DOUBLE > } field_type_t; > > typedef void (*iterate_callback)(const char *name, const char *value, Acked-by: Stefano Babic <stefano.babic@swupdate.org>
diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c index a3535e9ec0e4..ea4b03a476f5 100644 --- a/corelib/parsing_library_libconfig.c +++ b/corelib/parsing_library_libconfig.c @@ -29,7 +29,7 @@ static unsigned int map_field_type(field_type_t type) return CONFIG_TYPE_INT64; case TYPE_BOOL: return CONFIG_TYPE_BOOL; - case TYPE_FLOAT: + case TYPE_DOUBLE: return CONFIG_TYPE_FLOAT; default: /* not supported in SWUpdate */ return CONFIG_TYPE_NONE; diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index 86646676d419..187e4eadcc16 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -30,7 +30,7 @@ static json_type map_field_type(field_type_t type) return json_type_int; case TYPE_BOOL: return json_type_boolean; - case TYPE_FLOAT: + case TYPE_DOUBLE: return json_type_double; default: /* not supported in SWUpdate */ return json_type_null; diff --git a/include/parselib.h b/include/parselib.h index b0142ff26840..4a8717e0aad2 100644 --- a/include/parselib.h +++ b/include/parselib.h @@ -28,7 +28,7 @@ typedef enum { TYPE_INT, TYPE_INT64, TYPE_BOOL, - TYPE_FLOAT + TYPE_DOUBLE } field_type_t; typedef void (*iterate_callback)(const char *name, const char *value,
The libconfig/libjson adapters use "casts to double pointer" in this case, so lets name it DOUBLE rather than FLOAT. Signed-off-by: Christian Eggers <ceggers@arri.de> --- corelib/parsing_library_libconfig.c | 2 +- corelib/parsing_library_libjson.c | 2 +- include/parselib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)