Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
1da62311
Commit
1da62311
authored
5 years ago
by
Josh Borrow
Browse files
Options
Downloads
Patches
Plain Diff
Used smaller buffers in common_io.c where possible
parent
16475379
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1088
Io selection changes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common_io.c
+5
-5
5 additions, 5 deletions
src/common_io.c
with
5 additions
and
5 deletions
src/common_io.c
+
5
−
5
View file @
1da62311
...
...
@@ -2282,7 +2282,7 @@ void io_check_output_fields(struct swift_params* params,
/* Loop over each section */
for
(
int
section_id
=
0
;
section_id
<
params
->
sectionCount
;
section_id
++
)
{
char
section_name
[
PARSER_MAX_LINE
_SIZE
];
char
section_name
[
FIELD_BUFFER
_SIZE
];
sprintf
(
section_name
,
"%s"
,
params
->
section
[
section_id
].
name
);
/* Loop over each parameter */
...
...
@@ -2290,7 +2290,7 @@ void io_check_output_fields(struct swift_params* params,
const
char
*
param_name
=
params
->
data
[
param_id
].
name
;
char
comparison_section_name
[
PARSER_MAX_LINE
_SIZE
];
char
comparison_section_name
[
FIELD_BUFFER
_SIZE
];
/* Skip if wrong section */
sprintf
(
comparison_section_name
,
"%s"
,
"SelectOutput:"
);
...
...
@@ -2375,15 +2375,15 @@ void io_check_output_fields(struct swift_params* params,
for
(
int
field_id
=
0
;
field_id
<
num_fields
;
field_id
++
)
{
char
field_name
[
PARSER_MAX_LINE_SIZE
];
/* Note that section_name includes a : */
sprintf
(
field_name
,
"%s%
.*
s_%s"
,
section_name
,
FIELD_BUFFER_SIZE
,
list
[
field_id
].
name
,
part_type_names
[
ptype
]);
sprintf
(
field_name
,
"%s%s_%s"
,
section_name
,
list
[
field_id
].
name
,
part_type_names
[
ptype
]);
if
(
strcmp
(
param_name
,
field_name
)
==
0
)
{
found
=
1
;
/* Perform a correctness check on the _value_ of that
* parameter */
char
field_value
[
PARSER_MAX_LINE
_SIZE
];
char
field_value
[
FIELD_BUFFER
_SIZE
];
parser_get_param_string
(
params
,
field_name
,
&
field_value
[
0
]);
int
value_is_valid
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment