Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Vaclav Petras <[email protected]>
  • Loading branch information
kritibirda26 and wenzeslaus committed Jun 7, 2024
1 parent 86a0218 commit 2b4d017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions vector/v.info/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ int main(int argc, char *argv[])
}

if (format == JSON) {
char *serialized_string = NULL;
serialized_string = json_serialize_to_string_pretty(root_value);
char *serialized_string = json_serialize_to_string_pretty(root_value);
if (serialized_string == NULL) {
G_fatal_error(_("Failed to initialize pretty JSON string."));
}
Expand Down
3 changes: 1 addition & 2 deletions vector/v.info/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void print_topo(struct Map_info *Map, enum OutputFormat format,
Vect_get_num_holes(Map));
}
json_object_set_number(root_object, "primitives", nprimitives);
json_object_set_number(root_object, "map3d", Vect_is_3d(Map) ? 1 : 0);
json_object_set_boolean(root_object, "map3d", Vect_is_3d(Map));
}
}

Expand Down Expand Up @@ -262,7 +262,6 @@ void print_shell(struct Map_info *Map, const char *field_opt,
case JSON:
json_object_set_string(root_object, "name", Vect_get_name(Map));
json_object_set_string(root_object, "mapset", Vect_get_mapset(Map));
json_object_set_string(root_object, "location", G_location());
json_object_set_string(root_object, "project", G_location());
json_object_set_string(root_object, "database", G_gisdbase());
json_object_set_string(root_object, "title", Vect_get_map_name(Map));
Expand Down

0 comments on commit 2b4d017

Please sign in to comment.