Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
619aca16
Commit
619aca16
authored
Apr 25, 2013
by
Uwe Schulzweida
Browse files
institutInq: check contents of name and longname (bug fix)
parent
e54c999f
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
619aca16
2013-04-25 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* institutInq: check contents of name and longname (bug fix) [Bug #3419]
2013-04-23 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cfortran.h::kill_trailing: wrong result with gcc -O3, use prama for -O2 (bug fix) [report: Luis Kornblueh]
...
...
src/institution.c
View file @
619aca16
...
...
@@ -198,8 +198,12 @@ int institutInq(int center, int subcenter, const char *name, const char *longnam
ip1
->
used
=
0
;
ip1
->
center
=
center
;
ip1
->
subcenter
=
subcenter
;
ip1
->
name
=
(
char
*
)
name
;
ip1
->
longname
=
(
char
*
)
longname
;
ip1
->
name
=
NULL
;
ip1
->
longname
=
NULL
;
if
(
name
&&
*
name
)
ip1
->
name
=
(
char
*
)
name
;
if
(
longname
&&
*
longname
)
ip1
->
longname
=
(
char
*
)
longname
;
instCount
=
instituteCount
();
instResHs
=
xmalloc
(
instCount
*
sizeof
(
int
));
...
...
@@ -234,8 +238,8 @@ int institutDef(int center, int subcenter, const char *name, const char *longnam
instituteptr
->
center
=
center
;
instituteptr
->
subcenter
=
subcenter
;
if
(
name
)
instituteptr
->
name
=
strdupx
(
name
);
if
(
longname
)
instituteptr
->
longname
=
strdupx
(
longname
);
if
(
name
&&
*
name
)
instituteptr
->
name
=
strdupx
(
name
);
if
(
longname
&&
*
longname
)
instituteptr
->
longname
=
strdupx
(
longname
);
return
instituteptr
->
self
;
}
...
...
src/model.c
View file @
619aca16
...
...
@@ -172,7 +172,7 @@ int modelInq(int instID, int modelgribID, char *name)
if
(
modelptr
->
used
)
{
if
(
name
)
if
(
name
&&
*
name
)
{
found
=
1
;
if
(
instID
!=
-
1
&&
modelptr
->
instID
!=
instID
)
found
=
0
;
...
...
@@ -215,7 +215,7 @@ int modelDef(int instID, int modelgribID, const char *name)
modelptr
->
instID
=
instID
;
modelptr
->
modelgribID
=
modelgribID
;
if
(
name
)
modelptr
->
name
=
strdupx
(
name
);
if
(
name
&&
*
name
)
modelptr
->
name
=
strdupx
(
name
);
return
modelptr
->
self
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment