Commit 44ee2f8
committed
Fix premature use of optional argument in mpas_get_stream_filename
If no optional `ierr` argument is provided in calling the subroutine
`mpas_get_stream_filename()` the model segfaults by trying to assign to
the nonexistent argument. Additionally, `ierr` is set to zero to
initialize, but as this module uses its own error codes it should
instead use `MPAS_STREAM_MGR_NOERR`.
This change checks if `ierr` is present, and if so initializes it to
`MPAS_STREAM_MGR_NOERR`.1 parent db6dbba commit 44ee2f8
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4073 | 4073 | | |
4074 | 4074 | | |
4075 | 4075 | | |
4076 | | - | |
| 4076 | + | |
| 4077 | + | |
| 4078 | + | |
4077 | 4079 | | |
4078 | 4080 | | |
4079 | 4081 | | |
| |||
0 commit comments