Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
mpim-sw
libcdi
Commits
290dbb1c
Commit
290dbb1c
authored
9 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use SysError instead of perror and Error.
parent
5b3c8158
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!34
Version 2.2.0
,
!13
Consolidation with CDI-PIO (develop)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/grb_write.c
+3
-15
3 additions, 15 deletions
src/grb_write.c
with
3 additions
and
15 deletions
src/grb_write.c
+
3
−
15
View file @
290dbb1c
...
...
@@ -359,11 +359,7 @@ grbCopyRecord(stream_t *streamptr2, stream_t *streamptr1)
else
{
const
size_t
nwrite
=
fileWrite
(
fileID2
,
gribbuffer
,
nbytes
);
if
(
nwrite
!=
nbytes
)
{
perror
(
__func__
);
Error
(
"Could not write record for copying!"
);
}
if
(
nwrite
!=
nbytes
)
SysError
(
"Could not write record for copying!"
);
}
Free
(
gribbuffer
);
...
...
@@ -408,11 +404,7 @@ grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, co
case
CDI_PROTOCOL_ACROSS
:
{
#ifdef HAVE_ACROSS
if
(
across_write_grib_message
(
streamptr
,
gribbuffer
,
nbytes
))
{
Error
(
"Failed to write GRIB slice!"
);
break
;
}
if
(
across_write_grib_message
(
streamptr
,
gribbuffer
,
nbytes
))
SysError
(
"Failed to write GRIB slice!"
);
#endif
}
break
;
...
...
@@ -445,11 +437,7 @@ grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, co
=
(
size_t
(
*
)(
int
,
const
void
*
restrict
,
size_t
))
namespaceSwitchGet
(
NSSWITCH_FILE_WRITE
).
func
;
const
size_t
nwrite
=
myFileWrite
(
fileID
,
gribbuffer
,
nbytes
);
if
(
nwrite
!=
nbytes
)
{
perror
(
__func__
);
Error
(
"Failed to write GRIB slice!"
);
}
if
(
nwrite
!=
nbytes
)
SysError
(
"Failed to write GRIB slice!"
);
}
break
;
}
...
...
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