Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Robin Andersson <robin.andersson@modelon.com>
  • Loading branch information
1 parent 69807f8 commit 1c7bdfe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Config.cmake/fmixml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ set(FMIXMLHEADERS
src/
)

set(FMIXMLSOURCE
set(FMIXMLSOURCE
src/FMI/fmi_xml_context.c
src/FMI/fmi_xml_terminals_and_icons.c

Expand Down
2 changes: 1 addition & 1 deletion src/Import/include/FMI/fmi_import_terminals_and_icons.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2023 Modelon AB
Copyright (C) 2024 Modelon AB
This program is free software: you can redistribute it and/or modify
it under the terms of the BSD style license.
Expand Down
2 changes: 1 addition & 1 deletion src/Import/src/FMI/fmi_import_terminals_and_icons.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2023 Modelon AB
Copyright (C) 2024 Modelon AB
This program is free software: you can redistribute it and/or modify
it under the terms of the BSD style license.
Expand Down
2 changes: 1 addition & 1 deletion src/Import/src/FMI2/fmi2_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fmi2_import_t* fmi2_import_allocate(jm_callbacks* cb) {
jm_vector_init(char)(&fmu->logMessageBufferExpanded,0,cb);

fmu->options = fmi_util_allocate_options(cb);
if(!fmu->options) {
if (!fmu->options) {
goto err3;
}

Expand Down
2 changes: 1 addition & 1 deletion src/XML/src/FMI/fmi_xml_terminals_and_icons_scheme.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2023 Modelon AB
Copyright (C) 2024 Modelon AB
This program is free software: you can redistribute it and/or modify
it under the terms of the BSD style license.
Expand Down
8 changes: 4 additions & 4 deletions src/XML/src/FMI3/fmi3_xml_vendor_annotations.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ int fmi3_xml_handle_Tool(fmi3_xml_parser_context_t *context, const char* data) {
jm_string *pvendor;
char* vendor = 0;

if(!bufName) return -1;
if (!bufName) return -1;
/* <xs:attribute name="name" type="xs:normalizedString" use="required"> */
if( fmi3_xml_parse_attr_as_string(context, fmi3_xml_elmID_Tool, fmi_attr_id_name, 1, bufName))
if (fmi3_xml_parse_attr_as_string(context, fmi3_xml_elmID_Tool, fmi_attr_id_name, 1, bufName))
return -1;
pvendor = jm_vector_push_back(jm_string)(&md->vendorList, vendor);
len = jm_vector_get_size(char)(bufName);
if(pvendor )
if (pvendor)
*pvendor = vendor = (char*)(context->callbacks->malloc(len + 1));
if(!pvendor || !vendor) {
if (!pvendor || !vendor) {
fmi3_xml_parse_fatal(context, "Could not allocate memory");
return -1;
}
Expand Down

0 comments on commit 1c7bdfe

Please sign in to comment.