Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
8fd64b9e
Commit
8fd64b9e
authored
Apr 14, 2019
by
Uwe Schulzweida
Browse files
Fix scan-build warning: Access to field 'ncvarid' results in a dereference of a null pointer.
parent
cc73bd65
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/basetime.c
View file @
8fd64b9e
...
@@ -6,15 +6,17 @@
...
@@ -6,15 +6,17 @@
void
basetimeInit
(
basetime_t
*
basetime
)
void
basetimeInit
(
basetime_t
*
basetime
)
{
{
if
(
basetime
==
NULL
)
if
(
basetime
==
NULL
)
Error
(
"Internal problem! Basetime not allocated."
);
Error
(
"Internal problem! Basetime not allocated."
);
basetime
->
ncvarid
=
CDI_UNDEFID
;
if
(
basetime
)
basetime
->
ncdimid
=
CDI_UNDEFID
;
{
basetime
->
ncvarboundsid
=
CDI_UNDEFID
;
basetime
->
ncvarid
=
CDI_UNDEFID
;
basetime
->
leadtimeid
=
CDI_UNDEFID
;
basetime
->
ncdimid
=
CDI_UNDEFID
;
basetime
->
lwrf
=
false
;
basetime
->
ncvarboundsid
=
CDI_UNDEFID
;
basetime
->
timevar_cache
=
NULL
;
basetime
->
leadtimeid
=
CDI_UNDEFID
;
basetime
->
lwrf
=
false
;
basetime
->
timevar_cache
=
NULL
;
}
}
}
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment